fix(fc2c-i): assert / redirect via navigation, not resolve()
This commit is contained in:
@@ -6,9 +6,11 @@ describe('router', () => {
|
||||
expect(FRONT_DOOR).toBe('/showcase')
|
||||
})
|
||||
|
||||
it('/ redirects to FRONT_DOOR', () => {
|
||||
const resolved = router.resolve('/')
|
||||
expect(resolved.path).toBe(FRONT_DOOR)
|
||||
it('/ redirects to FRONT_DOOR', async () => {
|
||||
// resolve() does not follow redirects (they apply on navigation), so
|
||||
// actually navigate and assert the resulting route.
|
||||
await router.push('/')
|
||||
expect(router.currentRoute.value.path).toBe(FRONT_DOOR)
|
||||
})
|
||||
|
||||
it('gallery is reachable at /gallery', () => {
|
||||
|
||||
Reference in New Issue
Block a user