MCPcopy
hub / github.com/nestjs/nest / TestModule

Class TestModule

integration/hello-world/e2e/fastify-middleware-before-init.spec.ts:41–54  ·  integration/hello-world/e2e/fastify-middleware-before-init.spec.ts::TestModule

Source from the content-addressed store, hash-verified

39 }
40
41 @Module({
42 controllers: [TestController],
43 providers: [TestService],
44 })
45 class TestModule implements NestModule {
46 configure(consumer: MiddlewareConsumer) {
47 consumer
48 .apply((req, res, next) => {
49 res.setHeader(class="st">'x-middleware', class="st">'applied');
50 next();
51 })
52 .forRoutes(class="st">'*');
53 }
54 }
55
56 describe(class="st">'should queue middleware when registered before init', () => {
57 beforeEach(async () => {

Callers

nothing calls this directly

Calls 1

ModuleFunction · 0.90

Tested by

no test coverage detected