Jest testing with RQ and ensuring that the query is done before proceeding
Followed the guidance from https://tanstack.com/query/v4/docs/guides/testing (except I'm using
@testing-library/react-native and not @testing-library/react-hooks)
Say I got a MenuScreen that contains a lot of MenuLink
I then had made this TestHelper that allows me to render with a specific user
To ensure that the query is done - before doing any assertions I try to check the testQueryClient
But when upgrading to v4 it has revealed that some of my flaky test might be cause by this assumption might not be working - seems not to waiting TestHelper.renderWithUserAsync to be done .0 Replies