We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
end
1 parent 4fce5c0 commit efc026eCopy full SHA for efc026e
packages/router/__tests__/matcher/pathParser.spec.ts
@@ -618,6 +618,23 @@ describe('Path parser', () => {
618
matchParams('/home', '/other/home', {}, { start: false })
619
})
620
621
+ it('defaults to matching the end', () => {
622
+ // The default should behave like `end: true`
623
+ const optionSets = [{}, { end: true }]
624
+
625
+ for (const options of optionSets) {
626
+ matchParams('/home', '/home', {}, options)
627
+ matchParams('/home', '/home/', {}, options)
628
+ matchParams('/home', '/home/other', null, options)
629
+ matchParams('/home', '/homepage', null, options)
630
631
+ matchParams('/home/', '/home', {}, options)
632
+ matchParams('/home/', '/home/', {}, options)
633
+ matchParams('/home/', '/home/other', null, options)
634
+ matchParams('/home/', '/homepage', null, options)
635
+ }
636
+ })
637
638
it('can not match the end', () => {
639
const options = { end: false }
640
0 commit comments