Compare commits

...

2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
62fed068a9 test: enable async leak detection in vitest config
Co-authored-by: hyoban <38493346+hyoban@users.noreply.github.com>
2026-03-13 14:55:07 +00:00
copilot-swe-agent[bot]
a10aeeed59 Initial plan 2026-03-13 14:45:57 +00:00
2 changed files with 6 additions and 2 deletions

View File

@@ -82,8 +82,11 @@ vi.mock('@/app/components/base/voice-input', () => {
}
})
vi.stubGlobal('requestAnimationFrame', (cb: FrameRequestCallback) => setTimeout(() => cb(Date.now()), 16))
vi.stubGlobal('cancelAnimationFrame', (id: number) => clearTimeout(id))
vi.stubGlobal('requestAnimationFrame', (cb: FrameRequestCallback) => {
cb(Date.now())
return 0
})
vi.stubGlobal('cancelAnimationFrame', vi.fn())
vi.stubGlobal('devicePixelRatio', 1)
// Mock Canvas

View File

@@ -82,6 +82,7 @@ export default defineConfig(({ mode }) => {
// Vitest config
test: {
detectAsyncLeaks: true,
environment: 'jsdom',
globals: true,
setupFiles: ['./vitest.setup.ts'],