routes: [{ path: '/:p/:c', alias: ['/:p/c'], component }],
})
expect(
- 'Alias "/:p/c" and the original record: "/:p/:c" should have the exact same param named "c"'
+ 'Alias "/:p/c" and the original record: "/:p/:c" must have the exact same param named "c"'
).toHaveBeenWarned()
})
],
})
expect(
- `Absolute path "/:a/b" should have the exact same param named "b" as its parent "/:a/:b".`
+ `Absolute path "/:a/b" must have the exact same param named "b" as its parent "/:a/:b".`
).toHaveBeenWarned()
})
routes: [{ path: '/:p/:c', alias: ['/:p/:c+'], component }],
})
expect(
- 'Alias "/:p/:c+" and the original record: "/:p/:c" should have the exact same param named "c"'
+ 'Alias "/:p/:c+" and the original record: "/:p/:c" must have the exact same param named "c"'
).toHaveBeenWarned()
})
routes: [{ path: '/:p/c', alias: ['/:p/:c'], component }],
})
expect(
- 'Alias "/:p/:c" and the original record: "/:p/c" should have the exact same param named "c"'
+ 'Alias "/:p/:c" and the original record: "/:p/c" must have the exact same param named "c"'
).toHaveBeenWarned()
})
it('warns if a non valid function is passed as a component', async () => {
const Functional: FunctionalComponent = () => h('div', 'functional')
- // Functional should have a displayName to avoid the warning
+ // Functional must have a displayName to avoid the warning
const router = createRouter({
history: createMemoryHistory(),
for (const key of a.keys) {
if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))
return warn(
- `Alias "${b.record.path}" and the original record: "${a.record.path}" should have the exact same param named "${key.name}"`
+ `Alias "${b.record.path}" and the original record: "${a.record.path}" must have the exact same param named "${key.name}"`
)
}
for (const key of b.keys) {
if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))
return warn(
- `Alias "${b.record.path}" and the original record: "${a.record.path}" should have the exact same param named "${key.name}"`
+ `Alias "${b.record.path}" and the original record: "${a.record.path}" must have the exact same param named "${key.name}"`
)
}
}
for (const key of parent.keys) {
if (!record.keys.find(isSameParam.bind(null, key)))
return warn(
- `Absolute path "${record.record.path}" should have the exact same param named "${key.name}" as its parent "${parent.record.path}".`
+ `Absolute path "${record.record.path}" must have the exact same param named "${key.name}" as its parent "${parent.record.path}".`
)
}
}