import '@testing-library/jest-dom/vitest' import { afterEach, vi } from 'vitest' import { cleanup } from '@testing-library/react' Object.defineProperty(window, 'scrollTo', { value: vi.fn(), writable: true }) Object.defineProperty(window, 'innerWidth', { value: 1440, writable: true }) afterEach(() => { cleanup() vi.restoreAllMocks() window.history.replaceState(null, '', '/') })