ManimCat / frontend /src /test /setup.ts
Bin29's picture
Sync from main: 531f94c feat(ui): animate return home and connection guide exit
68722e4
Raw History Blame Contribute Delete
515 Bytes
import '@testing-library/jest-dom/vitest'
import { afterEach } from 'vitest'
import { cleanup } from '@testing-library/react'
// Vitest runs without `globals: true` here, so Testing Library never registers its implicit
// auto-cleanup. Registering it once in the shared setup keeps every React spec isolated without
// forcing each file to remember `cleanup()`. Resource cleanup (timers, stubs, event sources) stays
// owned by each fixture; this only unmounts the rendered trees.
afterEach(() => {
cleanup()
})