23 行
381 B
TypeScript
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
|
|
}
|