]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
test: add missing route
authorEduardo San Martin Morote <posva13@gmail.com>
Sun, 1 Mar 2020 18:37:57 +0000 (19:37 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Sun, 1 Mar 2020 18:37:57 +0000 (19:37 +0100)
__tests__/router.spec.ts

index d64dde5bced1d63eb93eab85c3c0adb8c0e64be5..12c31b390dc31909ade7c5c53a483c7d47e0527f 100644 (file)
@@ -71,7 +71,10 @@ describe('Router', () => {
   })
 
   it('can do initial navigation to /', async () => {
-    const router = createRouter({ history: createMemoryHistory(), routes: [] })
+    const router = createRouter({
+      history: createMemoryHistory(),
+      routes: [{ path: '/', component: components.Home }],
+    })
     expect(router.currentRoute.value).toBe(START_LOCATION_NORMALIZED)
     await router.push('/')
     expect(router.currentRoute.value).not.toBe(START_LOCATION_NORMALIZED)