@@ -453,7 +453,7 @@ describe('RouteNode', function () {
453453 it ( 'should automatically match deep nested "/" children' , ( ) => {
454454 var node = new RouteNode ( '' , '' , [
455455 new RouteNode ( 'section' , '/section' , [
456- new RouteNode ( 'top' , '/' ) ,
456+ new RouteNode ( 'top' , '/?withParam ' ) ,
457457 new RouteNode ( 'part' , '/:part' )
458458 ] )
459459 ] ) ;
@@ -462,6 +462,19 @@ describe('RouteNode', function () {
462462 node . buildPath ( 'section.top' ) . should . eql ( '/section/' ) ;
463463 node . buildPath ( 'section.top' , { } , { trailingSlash : false } ) . should . eql ( '/section' ) ;
464464 } ) ;
465+
466+ it ( 'should match deep nested "/" children with query params' , ( ) => {
467+ var node = new RouteNode ( '' , '' , [
468+ new RouteNode ( 'app' , '?:showVersion' , [
469+ new RouteNode ( 'admin' , '/admin' , [
470+ new RouteNode ( 'users' , '/?:sort?:page' )
471+ ] )
472+ ] )
473+ ] ) ;
474+
475+ withoutMeta ( node . matchPath ( '/admin/?page=1' ) ) . should . eql ( { name : 'app.admin.users' , params : { page : '1' } } ) ;
476+ withoutMeta ( node . matchPath ( '/admin/' ) ) . should . eql ( { name : 'app.admin.users' , params : { } } ) ;
477+ } ) ;
465478} ) ;
466479
467480
0 commit comments