invertase / invertase/tanstack-query-firebase
Modify subscription tests not to rely on "onSuccess"
Open
react-query-firebase
- Dominant language
- TypeScript
- Stars
- 462
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
In our subscription hooks, specifically in the internal hook `useSubscription`, we use the `setQueryCache` method to update data.
In our tests we are waiting for `onSuccess` to be called, which [no longer happens.](https://tanstack.com/query/v4/docs/guides/migrating-to-react-query-4#onsuccess-is-no-longer-called-from-setquerydata)
The suggestion in the tanstack docs is to have a useEffect hook depending on the data. I'm not sure how this will look in tests. Will have to investigate.
Contributor guide
Assessment
This issue has not been assessed yet.