'/a/:b/c',
'/a/:b',
'/a',
+ '/a-:b-:c',
+ '/a-:b',
+ '/a-:w(.*)',
+ '/:a-:b-:c',
+ '/:a-:b',
+ '/:a-:b(.*)',
+ '/:a/-:b',
'/:a/:b',
'/:w',
'/:w+',
- // '/:a/-:b',
- // '/:a/:b',
- // '/a-:b',
- // '/a-:w(.*)',
- // '/:a-b',
- // '/:a-:b-:c',
- // '/:a-:b',
- // '/:a-:b(.*)',
])
})
possibleOptions.forEach(options => {
checkPathOrder(['/:w', ['/:w?', options]])
checkPathOrder(['/:w?', ['/:w+', options]])
- checkPathOrder(['/:w?', ['/:w*', options]])
+ checkPathOrder(['/:w+', ['/:w*', options]])
+ checkPathOrder(['/:w+', ['/:w(.*)', options]])
})
})
'/a/_:b(\\d)*-other',
])
})
+
+ it('ending slashes less than params', () => {
+ checkPathOrder([
+ ['/a/b', { strict: false }],
+ ['/a/:b', { strict: true }],
+ ['/a/:b/', { strict: true }],
+ ])
+ })
})