-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rename and add tests to useDocumentQuery #101
rename and add tests to useDocumentQuery #101
Conversation
To view this pull requests documentation preview, visit the following URL: react-query-firebase.invertase.dev/~101 Documentation is deployed and generated using docs.page. |
7c42b42
to
4f6e660
Compare
expect(result.current.isError).toBe(true); | ||
}); | ||
|
||
expect(result.current.error).toBeDefined(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make a test utility here which does something along the lines of expectFirestoreError(result.current.error, 'firebase-code')
, and both checks .code
is defined and matches what is expected? We could hit a false positive here with it being an error unrelated to the none existent doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure yes, i do agree. let me setup a utility to run that check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
This PR tests the
useDocumentQuery
hook for the following assertions;