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

test-setup.ts

7 lines236 Bytes

1import { act } from '@testing-library/react'
2import { notifyManager } from '@tanstack/query-core'
3​
4// Wrap notifications with act to make sure React knows about React Query updates
5notifyManager.setNotifyFunction((fn) => {
6 act(fn)
7})