Testing mutations separately with jest #2363
-
|
Hey, I was wondering if it's possible to test mutations separately, eg. with jest. This is a problem, when Is it possible to "skip" the authorization without mocking the whole resolver? Could BlitzProvider help in this case? On the other hand, it shouldn't be possible, because bad boys could do this to access the application too :/ I'm looking forward to your answers :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Yes! New apps already have a couple of these for forgotPassword and resetPassword: https://github.com/blitz-js/blitz/blob/canary/packages/generator/templates/app/app/auth/mutations/resetPassword.test.ts You will need to add a bit more to |
Beta Was this translation helpful? Give feedback.
Yes! New apps already have a couple of these for forgotPassword and resetPassword: https://github.com/blitz-js/blitz/blob/canary/packages/generator/templates/app/app/auth/mutations/resetPassword.test.ts
You will need to add a bit more to
mockCtxlike$authorize: () => {}anduserIdor other fields if you need them.