mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-19 04:56:17 +00:00
Update tests to use vi instead of jest
This commit is contained in:
@@ -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 },
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user