mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-21 15:03:49 +00:00
Update tests to use vi instead of jest
This commit is contained in:
@@ -4,14 +4,14 @@ import type { ShlinkDomainRedirects } from '../../../src/api/types';
|
||||
import { editDomainRedirects } from '../../../src/domains/reducers/domainRedirects';
|
||||
|
||||
describe('domainRedirectsReducer', () => {
|
||||
beforeEach(jest.clearAllMocks);
|
||||
beforeEach(vi.clearAllMocks);
|
||||
|
||||
describe('editDomainRedirects', () => {
|
||||
const domain = 'example.com';
|
||||
const redirects = fromPartial<ShlinkDomainRedirects>({});
|
||||
const dispatch = jest.fn();
|
||||
const getState = jest.fn();
|
||||
const editDomainRedirectsCall = jest.fn();
|
||||
const dispatch = vi.fn();
|
||||
const getState = vi.fn();
|
||||
const editDomainRedirectsCall = vi.fn();
|
||||
const buildShlinkApiClient = () => fromPartial<ShlinkApiClient>({ editDomainRedirects: editDomainRedirectsCall });
|
||||
const editDomainRedirectsAction = editDomainRedirects(buildShlinkApiClient);
|
||||
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user