mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 09:30:31 +03:00
18 lines
407 B
TypeScript
18 lines
407 B
TypeScript
import { fromAny, fromPartial } from '@total-typescript/shoehorn';
|
|
|
|
const createLinkMock = () => ({
|
|
setAttribute: jest.fn(),
|
|
click: jest.fn(),
|
|
style: {},
|
|
});
|
|
|
|
export const appendChild = jest.fn();
|
|
|
|
export const removeChild = jest.fn();
|
|
|
|
export const windowMock = fromPartial<Window>({
|
|
document: fromAny({
|
|
createElement: jest.fn(createLinkMock),
|
|
body: { appendChild, removeChild },
|
|
}),
|
|
});
|