We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8c6ac1 commit 1077c2cCopy full SHA for 1077c2c
test/unit/specs/location.spec.js
@@ -79,6 +79,16 @@ describe('Location utils', () => {
79
})
80
81
it('relative params (non-named)', () => {
82
+ const loc = normalizeLocation({ params: { lang: 'fr' }}, {
83
+ path: '/en/foo',
84
+ params: { lang: 'en', id: 'foo' },
85
+ matched: [{ path: '/:lang(en|fr)/:id' }]
86
+ })
87
+ expect(loc._normalized).toBe(true)
88
+ expect(loc.path).toBe('/fr/foo')
89
90
+
91
+ it('custom regex can be case insensitive', () => {
92
const loc = normalizeLocation({ params: { lang: 'FR' }}, {
93
path: '/en/foo',
94
params: { lang: 'en', id: 'foo' },
0 commit comments