NestJS
Testing NestJS Guards, Interceptors, and Pipes
Guards, interceptors, pipes, and exception filters are the middleware layer of NestJS. They run before and after your controllers but are often left untested. This guide shows how to unit test each one in isolation using ExecutionContext mocks, and how to test their integration behavior via e2e tests with Supertest.