]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
test(matcher): test multiple children
authorEduardo San Martin Morote <posva13@gmail.com>
Sat, 14 Mar 2020 22:45:53 +0000 (23:45 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Sat, 14 Mar 2020 22:45:53 +0000 (23:45 +0100)
__tests__/matcher/addingRemoving.spec.ts

index d6341cf14499df89e2fb17cf6db4b50a3ce0eb34..0c15ad026d0a3e83344809af1ca1a94c8d5c0e03 100644 (file)
@@ -269,6 +269,15 @@ describe('normalizeRouteRecord', () => {
           component,
           children: [{ path: 'two', alias: ['t', 't2'], component }],
         },
+        {
+          path: 'xxx',
+          alias: ['x', 'x2'],
+          component,
+          children: [
+            { path: 'yyy', alias: ['y', 'y2'], component },
+            { path: 'zzz', alias: ['z', 'z2'], component },
+          ],
+        },
       ],
     })
 
@@ -282,6 +291,14 @@ describe('normalizeRouteRecord', () => {
       '/home/o/two',
       '/home/one/t2',
       '/o2/t',
+      '/xxx/yyy',
+      '/x/yyy',
+      '/x2/yyy',
+      '/x2/y',
+      '/x2/y2',
+      '/x2/zzz',
+      '/x2/z',
+      '/x2/z2',
     ].forEach(path => {
       expect(matcher.resolve({ path }, currentLocation)).toMatchObject({
         path,