NestJS · Middle · Question 42 of 75

How do you override a guard in a test to simulate an authenticated user?

Explanation

Similar helpers exist for pipes, interceptors and filters: overridePipe, overrideInterceptor, overrideFilter.

Further reading

Problem with a question

NestJS · Middle · question 42

Test yourself

Take the NestJS · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz