mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-16 04:23:47 +00:00
Update tests to use vi instead of jest
This commit is contained in:
@@ -14,12 +14,12 @@ import {
|
||||
import type { OrphanVisit } from '../../../src/visits/types';
|
||||
|
||||
describe('visitsOverviewReducer', () => {
|
||||
const getVisitsOverview = jest.fn();
|
||||
const getVisitsOverview = vi.fn();
|
||||
const buildApiClientMock = () => fromPartial<ShlinkApiClient>({ getVisitsOverview });
|
||||
const loadVisitsOverview = loadVisitsOverviewCreator(buildApiClientMock);
|
||||
const { reducer } = visitsOverviewReducerCreator(loadVisitsOverview);
|
||||
|
||||
beforeEach(jest.clearAllMocks);
|
||||
beforeEach(vi.clearAllMocks);
|
||||
|
||||
describe('reducer', () => {
|
||||
const state = (payload: Partial<VisitsOverview> = {}) => fromPartial<VisitsOverview>(payload);
|
||||
@@ -128,7 +128,7 @@ describe('visitsOverviewReducer', () => {
|
||||
});
|
||||
|
||||
describe('loadVisitsOverview', () => {
|
||||
const dispatchMock = jest.fn();
|
||||
const dispatchMock = vi.fn();
|
||||
const getState = () => fromPartial<ShlinkState>({});
|
||||
|
||||
it.each([
|
||||
|
||||
Reference in New Issue
Block a user