@@ -418,7 +418,7 @@ describe('getRoutes', function () {
418418 ] )
419419 } )
420420
421- it . skip ( 'should handle multiple routers with different configuration options mounted at the same path' , function ( ) {
421+ it ( 'should handle multiple routers with different configuration options mounted at the same path' , function ( ) {
422422 const router = new Router ( { strict : true , caseSensitive : true } )
423423 const inner = new Router ( { strict : true , caseSensitive : false } )
424424 const otherInner = new Router ( { strict : true , caseSensitive : true } )
@@ -436,10 +436,57 @@ describe('getRoutes', function () {
436436 router . use ( inner )
437437
438438 assert . deepStrictEqual ( router . getRoutes ( ) , [
439- { path : '/t2/:t5' , methods : [ 'PUT' ] , keys : [ { name : 't5' , type : 'param' } ] , options : { strict : true , caseSensitive : true } } ,
440- { path : '/t2/:t6' , methods : [ 'POST' ] , keys : [ { name : 't6' , type : 'param' } ] , options : { strict : true , caseSensitive : true } } ,
441- { path : '/t2/:t5' , methods : [ 'PUT' ] , keys : [ { name : 't5' , type : 'param' } ] , options : { strict : true , caseSensitive : false } } ,
442- { path : '/t2/:t6' , methods : [ 'GET' ] , keys : [ { name : 't6' , type : 'param' } ] , options : { strict : true , caseSensitive : false } }
439+ {
440+ path : '/' ,
441+ methods : undefined ,
442+ keys : undefined ,
443+ options : { strict : true , caseSensitive : true } ,
444+ router : [
445+ {
446+ path : '/t2' ,
447+ methods : undefined ,
448+ keys : undefined ,
449+ options : { strict : true , caseSensitive : false } ,
450+ router : [
451+ {
452+ path : '/:t5' ,
453+ methods : [ 'PUT' ] ,
454+ keys : [ { name : 't5' , type : 'param' } ] ,
455+ options : { strict : true , caseSensitive : true } ,
456+ router : undefined
457+ } ,
458+ {
459+ path : '/:t6' ,
460+ methods : [ 'POST' ] ,
461+ keys : [ { name : 't6' , type : 'param' } ] ,
462+ options : { strict : true , caseSensitive : true } ,
463+ router : undefined
464+ }
465+ ]
466+ } ,
467+ {
468+ path : '/t2' ,
469+ methods : undefined ,
470+ keys : undefined ,
471+ options : { strict : true , caseSensitive : false } ,
472+ router : [ {
473+ path : '/:t5' ,
474+ methods : [ 'PUT' ] ,
475+ keys : [ { name : 't5' , type : 'param' } ] ,
476+ options : { strict : true , caseSensitive : false } ,
477+ router : undefined
478+ } ,
479+ {
480+ path : '/:t6' ,
481+ methods : [ 'GET' ] ,
482+ keys : [ { name : 't6' , type : 'param' } ] ,
483+ options : { strict : true , caseSensitive : false } ,
484+ router : undefined
485+ } ]
486+
487+ }
488+ ]
489+ }
443490 ] )
444491 } )
445492} )
0 commit comments