Replies: 1 comment
-
|
Hey, can you share this setup as part of a repo that I can use to reproduce the issue? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need help testing API responses with an authenticated user. None of my tests work; I cannot make the
loginAsclient method work.In my project, I have two guards:
customerandadmin. Having several route groups under those guards, I can't make the API tests work properly. I'll explain my issue with a simplified example.Route
auth.ts - Guards configuration
tests/bootstrap.ts
My test
While debugging, I realized that the Auth Middleware cannot perform the authentication and then automatically redirects to the login page, so the
responseobject in the test cannot assert the proper API response (201).Beta Was this translation helpful? Give feedback.
All reactions