mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-08-02 00:51:52 +00:00
Update tests to use vi instead of jest
This commit is contained in:
@@ -9,12 +9,12 @@ import {
|
||||
|
||||
describe('shortUrlCreationReducer', () => {
|
||||
const shortUrl = fromPartial<ShortUrl>({});
|
||||
const createShortUrlCall = jest.fn();
|
||||
const createShortUrlCall = vi.fn();
|
||||
const buildShlinkApiClient = () => fromPartial<ShlinkApiClient>({ createShortUrl: createShortUrlCall });
|
||||
const createShortUrl = createShortUrlCreator(buildShlinkApiClient);
|
||||
const { reducer, resetCreateShortUrl } = shortUrlCreationReducerCreator(createShortUrl);
|
||||
|
||||
afterEach(jest.resetAllMocks);
|
||||
afterEach(vi.resetAllMocks);
|
||||
|
||||
describe('reducer', () => {
|
||||
it('returns loading on CREATE_SHORT_URL_START', () => {
|
||||
@@ -52,7 +52,7 @@ describe('shortUrlCreationReducer', () => {
|
||||
});
|
||||
|
||||
describe('createShortUrl', () => {
|
||||
const dispatch = jest.fn();
|
||||
const dispatch = vi.fn();
|
||||
const getState = () => fromPartial<ShlinkState>({});
|
||||
|
||||
it('calls API on success', async () => {
|
||||
|
||||
Reference in New Issue
Block a user