Move shlink-web-component tests to their own folder

This commit is contained in:
Alejandro Celaya
2023-08-02 09:01:44 +02:00
parent c48facc863
commit c794ff8b58
124 changed files with 455 additions and 371 deletions

View File

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