@@ -197,7 +197,7 @@ describe('RouteNode', function () {
197197 withoutMeta ( node . matchPath ( '/grand-parent/parent/child?nickname=gran&nickname=granny&name=maman&age=3' ) ) . should . eql ( { name : 'grandParent.parent.child' , params : { nickname : [ 'gran' , 'granny' ] , name : 'maman' , age : '3' } } ) ;
198198
199199 // still matching remainingPath only consist of unknown qsParams
200- node . matchPath ( '/grand-parent?nickname=gran&name=papa' ) . should . eql ( {
200+ node . matchPath ( '/grand-parent?nickname=gran&name=papa' , { strictQueryParams : false } ) . should . eql ( {
201201 _meta : {
202202 grandParent : {
203203 nickname : 'query'
@@ -206,7 +206,7 @@ describe('RouteNode', function () {
206206 name : 'grandParent' ,
207207 params : { nickname : 'gran' }
208208 } ) ;
209- node . matchPath ( '/grand-parent/parent/child?nickname=gran&names=papa-maman' ) . should . eql ( {
209+ node . matchPath ( '/grand-parent/parent/child?nickname=gran&names=papa-maman' , { strictQueryParams : false } ) . should . eql ( {
210210 _meta : {
211211 grandParent : {
212212 nickname : 'query'
@@ -269,19 +269,19 @@ describe('RouteNode', function () {
269269 it ( 'should match paths with optional trailing slashes' , function ( ) {
270270 var rootNode = getRoutes ( ) ;
271271 should . not . exists ( rootNode . matchPath ( '/users/list/' ) ) ;
272- withoutMeta ( rootNode . matchPath ( '/users/list' , true ) ) . should . eql ( { name : 'users.list' , params : { } } ) ;
272+ withoutMeta ( rootNode . matchPath ( '/users/list' , { trailingSlash : true } ) ) . should . eql ( { name : 'users.list' , params : { } } ) ;
273273 withoutMeta ( rootNode . matchPath ( '/users/list' ) ) . should . eql ( { name : 'users.list' , params : { } } ) ;
274- withoutMeta ( rootNode . matchPath ( '/users/list/' , true ) ) . should . eql ( { name : 'users.list' , params : { } } ) ;
275- should . not . exists ( rootNode . matchPath ( '/users/list//' , true ) ) ;
274+ withoutMeta ( rootNode . matchPath ( '/users/list/' , { trailingSlash : true } ) ) . should . eql ( { name : 'users.list' , params : { } } ) ;
275+ should . not . exists ( rootNode . matchPath ( '/users/list//' , { trailingSlash : true } ) ) ;
276276
277277 var rootNode = getRoutes ( true ) ;
278278 should . not . exists ( rootNode . matchPath ( '/users/list' ) ) ;
279- withoutMeta ( rootNode . matchPath ( '/users/list' , true ) ) . should . eql ( { name : 'users.list' , params : { } } ) ;
280- withoutMeta ( rootNode . matchPath ( '/users/list/' , true ) ) . should . eql ( { name : 'users.list' , params : { } } ) ;
279+ withoutMeta ( rootNode . matchPath ( '/users/list' , { trailingSlash : true } ) ) . should . eql ( { name : 'users.list' , params : { } } ) ;
280+ withoutMeta ( rootNode . matchPath ( '/users/list/' , { trailingSlash : true } ) ) . should . eql ( { name : 'users.list' , params : { } } ) ;
281281 withoutMeta ( rootNode . matchPath ( '/users/list/' ) ) . should . eql ( { name : 'users.list' , params : { } } ) ;
282282 withoutMeta ( rootNode . matchPath ( '/' ) ) . should . eql ( { name : 'default' , params : { } } ) ;
283- withoutMeta ( rootNode . matchPath ( '' , true ) ) . should . eql ( { name : 'default' , params : { } } ) ;
284- should . not . exists ( rootNode . matchPath ( '/users/list//' , true ) ) ;
283+ withoutMeta ( rootNode . matchPath ( '' , { trailingSlash : true } ) ) . should . eql ( { name : 'default' , params : { } } ) ;
284+ should . not . exists ( rootNode . matchPath ( '/users/list//' , { trailingSlash : true } ) ) ;
285285 } ) ;
286286} ) ;
287287
0 commit comments