| 374 | |
| 375 | describe(class="st">'should execute middleware only once for given routes', () => { |
| 376 | class Middleware implements NestMiddleware { |
| 377 | use(request: any, reply: any, next: () => void) { |
| 378 | if (request.middlewareExecutionCount === undefined) { |
| 379 | request.middlewareExecutionCount = 1; |
| 380 | } else { |
| 381 | request.middlewareExecutionCount++; |
| 382 | } |
| 383 | next(); |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | @Controller() |
| 388 | class AbcController { |
nothing calls this directly
no outgoing calls
no test coverage detected