Stub scrollTo in Vitest setup
- Silence jsdom's not-implemented warning during router-driven tests - Keep the fix in test bootstrap only so runtime behavior stays unchanged
This commit is contained in:
parent
484741db5c
commit
1b06b9dc33
1 changed files with 6 additions and 0 deletions
|
|
@ -1 +1,7 @@
|
||||||
import '@testing-library/jest-dom/vitest';
|
import '@testing-library/jest-dom/vitest';
|
||||||
|
import { vi } from 'vitest';
|
||||||
|
|
||||||
|
Object.defineProperty(window, 'scrollTo', {
|
||||||
|
value: vi.fn(),
|
||||||
|
writable: true,
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue