ファイル
btrc-hub/frontend/src/test/setup.ts
T
2026-05-13 21:49:40 +09:00

23 行
381 B
TypeScript

import '@testing-library/jest-dom/vitest'
import { cleanup } from '@testing-library/react'
import { afterEach, vi } from 'vitest'
afterEach (() => {
cleanup ()
localStorage.clear ()
vi.restoreAllMocks ()
})
Element.prototype.scrollIntoView = function () {
;
}
window.scroll = function () {
;
}
window.requestAnimationFrame = callback => {
callback (0)
return 0
}