12 lines
271 B
TypeScript
12 lines
271 B
TypeScript
import { beforeEach } from 'vitest';
|
|
import '@testing-library/jest-dom/vitest';
|
|
|
|
beforeEach(() => {
|
|
if (typeof window === 'undefined') return;
|
|
// reset dom before each test
|
|
const html = document.querySelector('html');
|
|
if (html) {
|
|
html.innerHTML = '';
|
|
}
|
|
});
|