mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-13 18:16:20 +00:00
Update tests to use vi instead of jest
This commit is contained in:
@@ -7,12 +7,12 @@ import {
|
||||
} from '../../../src/short-urls/reducers/shortUrlDeletion';
|
||||
|
||||
describe('shortUrlDeletionReducer', () => {
|
||||
const deleteShortUrlCall = jest.fn();
|
||||
const deleteShortUrlCall = vi.fn();
|
||||
const buildShlinkApiClient = () => fromPartial<ShlinkApiClient>({ deleteShortUrl: deleteShortUrlCall });
|
||||
const deleteShortUrl = deleteShortUrlCreator(buildShlinkApiClient);
|
||||
const { reducer, resetDeleteShortUrl } = shortUrlDeletionReducerCreator(deleteShortUrl);
|
||||
|
||||
beforeEach(jest.clearAllMocks);
|
||||
beforeEach(vi.clearAllMocks);
|
||||
|
||||
describe('reducer', () => {
|
||||
it('returns loading on DELETE_SHORT_URL_START', () =>
|
||||
@@ -56,8 +56,8 @@ describe('shortUrlDeletionReducer', () => {
|
||||
});
|
||||
|
||||
describe('deleteShortUrl', () => {
|
||||
const dispatch = jest.fn();
|
||||
const getState = jest.fn().mockReturnValue({ selectedServer: {} });
|
||||
const dispatch = vi.fn();
|
||||
const getState = vi.fn().mockReturnValue({ selectedServer: {} });
|
||||
|
||||
it.each(
|
||||
[[undefined], [null], ['example.com']],
|
||||
|
||||
Reference in New Issue
Block a user