shlink-web-client/config/test/setupTests.ts

12 lines
277 B
TypeScript
Raw Normal View History

import '@testing-library/jest-dom/vitest';
2023-05-27 12:36:18 +03:00
import { cleanup } from '@testing-library/react';
import { afterEach } from 'vitest';
2023-05-27 12:36:18 +03:00
// Clear all mocks and cleanup DOM after every test
2023-05-27 12:36:18 +03:00
afterEach(() => {
vi.clearAllMocks();
2023-05-27 12:36:18 +03:00
cleanup();
});
(global as any).scrollTo = () => {};