Update tests to use vi instead of jest

This commit is contained in:
Alejandro Celaya
2023-05-27 11:57:26 +02:00
parent e2cbb2713a
commit 07fcb4e016
117 changed files with 3699 additions and 325 deletions

View File

@@ -13,10 +13,10 @@ import {
} from '../../../src/domains/reducers/domainsList';
describe('domainsListReducer', () => {
const dispatch = jest.fn();
const getState = jest.fn();
const listDomains = jest.fn();
const health = jest.fn();
const dispatch = vi.fn();
const getState = vi.fn();
const listDomains = vi.fn();
const health = vi.fn();
const buildShlinkApiClient = () => fromPartial<ShlinkApiClient>({ listDomains, health });
const filteredDomains: Domain[] = [
fromPartial({ domain: 'foo', status: 'validating' }),
@@ -30,7 +30,7 @@ describe('domainsListReducer', () => {
editDomainRedirectsThunk,
);
beforeEach(jest.clearAllMocks);
beforeEach(vi.clearAllMocks);
describe('reducer', () => {
it('returns loading on LIST_DOMAINS_START', () => {