Skip to content

Commit 73d4ee6

Browse files
test(fastify): update broken integration tests
1 parent 466e9b9 commit 73d4ee6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

integration/hello-world/e2e/middleware-fastify.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ describe('Middleware (FastifyAdapter)', () => {
441441
return { success: true, root: true };
442442
}
443443

444-
@Get(':id')
444+
@Get('record/:id')
445445
async record(@Req() req: FastifyRequest['raw'], @Param('id') id: string) {
446446
return { success: true, record: id };
447447
}
@@ -542,25 +542,25 @@ describe('Middleware (FastifyAdapter)', () => {
542542
});
543543

544544
it(`GET forRoutes('{*path}') with global prefix and exclude pattern with wildcard`, async () => {
545-
app.setGlobalPrefix('/api', { exclude: ['/{*path}'] });
545+
app.setGlobalPrefix('/api', { exclude: ['/record/{*path}'] });
546546
await app.init();
547547
await app.getHttpAdapter().getInstance().ready();
548548

549549
await request(app.getHttpServer())
550-
.get('/pong')
550+
.get('/api/pong')
551551
.expect(200, { success: true, pong: 'pong' });
552552
await request(app.getHttpServer())
553-
.get('/api/abc123')
554-
.expect(200, { success: true, pong: 'abc123' });
553+
.get('/record/abc123')
554+
.expect(200, { success: true, record: 'abc123' });
555555
});
556556

557557
it(`GET forRoutes('{*path}') with global prefix and exclude pattern with parameter`, async () => {
558-
app.setGlobalPrefix('/api', { exclude: ['/:id'] });
558+
app.setGlobalPrefix('/api', { exclude: ['/record/:id'] });
559559
await app.init();
560560
await app.getHttpAdapter().getInstance().ready();
561561

562562
await request(app.getHttpServer())
563-
.get('/abc123')
563+
.get('/record/abc123')
564564
.expect(200, { success: true, record: 'abc123' });
565565
await request(app.getHttpServer())
566566
.get('/api/pong')

0 commit comments

Comments
 (0)