このコミットが含まれているのは:
@@ -1,6 +1,10 @@
|
||||
import '@testing-library/jest-dom/vitest'
|
||||
import { cleanup } from '@testing-library/react'
|
||||
import { afterEach, vi } from 'vitest'
|
||||
import { afterEach, beforeEach, vi } from 'vitest'
|
||||
|
||||
beforeEach (() => {
|
||||
vi.spyOn (HTMLCanvasElement.prototype, 'getContext').mockReturnValue (null)
|
||||
})
|
||||
|
||||
afterEach (() => {
|
||||
cleanup ()
|
||||
@@ -16,10 +20,10 @@ window.scroll = function () {
|
||||
;
|
||||
}
|
||||
|
||||
window.requestAnimationFrame = callback => {
|
||||
callback (0)
|
||||
return 0
|
||||
}
|
||||
// Animation callbacks must advance time and must not recurse synchronously.
|
||||
window.requestAnimationFrame = callback => window.setTimeout (
|
||||
() => callback (performance.now ()), 16)
|
||||
window.cancelAnimationFrame = identifier => window.clearTimeout (identifier)
|
||||
|
||||
Object.defineProperty (window, 'matchMedia', {
|
||||
configurable: true,
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする