@@ -441,7 +441,7 @@ describe('Middleware (FastifyAdapter)', () => {
441
441
return { success : true , root : true } ;
442
442
}
443
443
444
- @Get ( ':id' )
444
+ @Get ( 'record/ :id' )
445
445
async record ( @Req ( ) req : FastifyRequest [ 'raw' ] , @Param ( 'id' ) id : string ) {
446
446
return { success : true , record : id } ;
447
447
}
@@ -542,25 +542,25 @@ describe('Middleware (FastifyAdapter)', () => {
542
542
} ) ;
543
543
544
544
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}' ] } ) ;
546
546
await app . init ( ) ;
547
547
await app . getHttpAdapter ( ) . getInstance ( ) . ready ( ) ;
548
548
549
549
await request ( app . getHttpServer ( ) )
550
- . get ( '/pong' )
550
+ . get ( '/api/ pong' )
551
551
. expect ( 200 , { success : true , pong : 'pong' } ) ;
552
552
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' } ) ;
555
555
} ) ;
556
556
557
557
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' ] } ) ;
559
559
await app . init ( ) ;
560
560
await app . getHttpAdapter ( ) . getInstance ( ) . ready ( ) ;
561
561
562
562
await request ( app . getHttpServer ( ) )
563
- . get ( '/abc123' )
563
+ . get ( '/record/ abc123' )
564
564
. expect ( 200 , { success : true , record : 'abc123' } ) ;
565
565
await request ( app . getHttpServer ( ) )
566
566
. get ( '/api/pong' )
0 commit comments