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

@@ -1,18 +1,18 @@
import { fromAny, fromPartial } from '@total-typescript/shoehorn';
const createLinkMock = () => ({
setAttribute: jest.fn(),
click: jest.fn(),
setAttribute: vi.fn(),
click: vi.fn(),
style: {},
});
export const appendChild = jest.fn();
export const appendChild = vi.fn();
export const removeChild = jest.fn();
export const removeChild = vi.fn();
export const windowMock = fromPartial<Window>({
document: fromAny({
createElement: jest.fn(createLinkMock),
createElement: vi.fn(createLinkMock),
body: { appendChild, removeChild },
}),
});