Replies: 2 comments 5 replies
-
Hi @dhythm. There were quite many changes between 0.36 and the latest release, e.g. switching to the next.js fork which was a big change. But this looks like a regression. Could you provide a minimal reproduction, e.g. a test file? FWIW, if not using mock is something that you'd be interested in, you can take a look at this discussion: #2977. |
Beta Was this translation helpful? Give feedback.
4 replies
-
I hoist an issue (https://github.com/blitz-js/blitz/issues/3119) about this regression. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
Is there a way to mock Query/Mutation resolver at blitz 0.44.4?
Issue I'm facing
When I used an older version of blitz (v0.36.4), I could write mock for query/mutation resolver like the below and tests work well.
However, the same tests are failed after upgrading to v0.44.4.
The tests for pages that use
const [res] = useQuery(getUsers)
show an error asTypeError: Cannot read property 'error' of undefined
. In this case, res should return data with the type of{ data: T, error: null } | { data: null, error: U }
.Same as the above, tests for hooks with renderHooks are failed as well.
It returns
TypeError: Cannot read property 'current' of undefined
.Beta Was this translation helpful? Give feedback.
All reactions