From: Eduardo San Martin Morote Date: Thu, 17 Oct 2019 17:19:52 +0000 (+0200) Subject: test(matcher): test alias with children X-Git-Tag: v4.0.0-alpha.0~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf8eb50d816d2a577325a36994c2fc5f45d7dd41;p=thirdparty%2Fvuejs%2Frouter.git test(matcher): test alias with children --- diff --git a/__tests__/matcher.spec.ts b/__tests__/matcher.spec.ts index 0c45d367..25812de7 100644 --- a/__tests__/matcher.spec.ts +++ b/__tests__/matcher.spec.ts @@ -110,6 +110,28 @@ describe('Router Matcher', () => { } ) }) + + it('resolves an alias with children', () => { + const children = [{ path: 'one', component, name: 'nested' }] + assertRecordMatch( + { + path: '/parent', + alias: '/p', + component, + children, + }, + { path: '/p/one' }, + { + path: '/p/one', + name: 'nested', + params: {}, + matched: [ + { path: '/p', children, components }, + { path: '/p/one', name: 'nested', components }, + ], + } + ) + }) }) describe('LocationAsPath', () => {