Skip to content
Source
Sign inSign up
TanStack/virtual
Open History to see the last commit

test-setup.ts

9 lines318 Bytes

1import '@testing-library/jest-dom/vitest'
2import { cleanup } from '@testing-library/react'
3import { afterEach } from 'vitest'
4import ResizeObserver from 'resize-observer-polyfill'
5​
6// https://testing-library.com/docs/react-testing-library/api#cleanup
7afterEach(() => cleanup())
8​
9global.ResizeObserver = ResizeObserver