From: Eduardo San Martin Morote Date: Sat, 14 Mar 2020 22:45:53 +0000 (+0100) Subject: test(matcher): test multiple children X-Git-Tag: v4.0.0-alpha.4~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcfe694d6e3d7e33482878a2c020ccb7f409c277;p=thirdparty%2Fvuejs%2Frouter.git test(matcher): test multiple children --- diff --git a/__tests__/matcher/addingRemoving.spec.ts b/__tests__/matcher/addingRemoving.spec.ts index d6341cf1..0c15ad02 100644 --- a/__tests__/matcher/addingRemoving.spec.ts +++ b/__tests__/matcher/addingRemoving.spec.ts @@ -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,