Open History to see the last commit
1import '@testing-library/jest-dom/vitest'
2import { act, cleanup } from '@testing-library/react'
3import { afterEach } from 'vitest'
4import { notifyManager } from '@tanstack/react-query'
5β
6// https://testing-library.com/docs/react-testing-library/api#cleanup
7afterEach(() => cleanup())
8β
9// Wrap notifications with act to make sure React knows about React Query updates
10notifyManager.setNotifyFunction((fn) => {
11 act(fn)
12})