mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 09:30:31 +03:00
23 lines
505 B
TypeScript
23 lines
505 B
TypeScript
import 'vitest-canvas-mock';
|
|
import '@testing-library/jest-dom/vitest';
|
|
import { cleanup } from '@testing-library/react';
|
|
import axe from 'axe-core';
|
|
import { afterEach } from 'vitest';
|
|
|
|
axe.configure({
|
|
checks: [
|
|
{
|
|
// Disable color contrast checking, as it doesn't work in jsdom
|
|
id: 'color-contrast',
|
|
enabled: false,
|
|
},
|
|
],
|
|
});
|
|
|
|
// Clear all mocks and cleanup DOM after every test
|
|
afterEach(() => {
|
|
vi.clearAllMocks();
|
|
cleanup();
|
|
});
|
|
|
|
(global as any).scrollTo = () => {};
|