@@ -25,17 +25,17 @@ describe('maybeParameterizeRemixRoute', () => {
2525 } ) ;
2626
2727 describe ( 'when manifest has static routes' , ( ) => {
28- it ( 'should return undefined for static routes' , ( ) => {
28+ it ( 'returns the route itself for static routes' , ( ) => {
2929 const manifest : RouteManifest = {
3030 staticRoutes : [ { path : '/' } , { path : '/about' } , { path : '/contact' } , { path : '/blog/posts' } ] ,
3131 dynamicRoutes : [ ] ,
3232 } ;
3333 globalWithInjectedManifest . _sentryRemixRouteManifest = JSON . stringify ( manifest ) ;
3434
35- expect ( maybeParameterizeRemixRoute ( '/' ) ) . toBeUndefined ( ) ;
36- expect ( maybeParameterizeRemixRoute ( '/about' ) ) . toBeUndefined ( ) ;
37- expect ( maybeParameterizeRemixRoute ( '/contact' ) ) . toBeUndefined ( ) ;
38- expect ( maybeParameterizeRemixRoute ( '/blog/posts' ) ) . toBeUndefined ( ) ;
35+ expect ( maybeParameterizeRemixRoute ( '/' ) ) . toBe ( '/' ) ;
36+ expect ( maybeParameterizeRemixRoute ( '/about' ) ) . toBe ( '/about' ) ;
37+ expect ( maybeParameterizeRemixRoute ( '/contact' ) ) . toBe ( '/contact' ) ;
38+ expect ( maybeParameterizeRemixRoute ( '/blog/posts' ) ) . toBe ( '/blog/posts' ) ;
3939 } ) ;
4040 } ) ;
4141
@@ -84,8 +84,8 @@ describe('maybeParameterizeRemixRoute', () => {
8484 } ;
8585 globalWithInjectedManifest . _sentryRemixRouteManifest = JSON . stringify ( manifest ) ;
8686
87- expect ( maybeParameterizeRemixRoute ( '/' ) ) . toBeUndefined ( ) ;
88- expect ( maybeParameterizeRemixRoute ( '/about' ) ) . toBeUndefined ( ) ;
87+ expect ( maybeParameterizeRemixRoute ( '/' ) ) . toBe ( '/' ) ;
88+ expect ( maybeParameterizeRemixRoute ( '/about' ) ) . toBe ( '/about' ) ;
8989 } ) ;
9090
9191 it ( 'should handle splat/catch-all routes' , ( ) => {
@@ -222,7 +222,7 @@ describe('maybeParameterizeRemixRoute', () => {
222222 } ;
223223 globalWithInjectedManifest . _sentryRemixRouteManifest = JSON . stringify ( manifest ) ;
224224
225- expect ( maybeParameterizeRemixRoute ( '/' ) ) . toBeUndefined ( ) ;
225+ expect ( maybeParameterizeRemixRoute ( '/' ) ) . toBe ( '/' ) ;
226226 } ) ;
227227
228228 it ( 'should handle complex nested dynamic routes' , ( ) => {
@@ -246,10 +246,10 @@ describe('maybeParameterizeRemixRoute', () => {
246246
247247 describe ( 'realistic Remix patterns' , ( ) => {
248248 it . each ( [
249- [ '/' , undefined ] ,
250- [ '/about' , undefined ] ,
251- [ '/contact' , undefined ] ,
252- [ '/blog/posts' , undefined ] ,
249+ [ '/' , '/' ] ,
250+ [ '/about' , '/about' ] ,
251+ [ '/contact' , '/contact' ] ,
252+ [ '/blog/posts' , '/blog/posts' ] ,
253253
254254 [ '/users/123' , '/users/:id' ] ,
255255 [ '/users/john-doe' , '/users/:id' ] ,
0 commit comments