Replies: 1 comment 2 replies
-
I have in the past disabled authentication during test by not mounting the authentication component during testing. It might not address your specific use case but i think it gives you an idea unless there is a special decorator for this: if (process.env.NODE_ENV !== 'test') {
this.component(AuthenticationComponent);
registerAuthenticationStrategy(this, JWTAuthenticationStrategy);
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have implemented authorizations for controller endpoints using a JWT strategy. I would like to disable authentication/authorization when running particular tests. For example, I have a validation for users' email address uniqueness. I do not want to invoke authorization testing this code. How do I selectively disable authentication during testing?
Beta Was this translation helpful? Give feedback.
All reactions