From cf8eb50d816d2a577325a36994c2fc5f45d7dd41 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Thu, 17 Oct 2019 19:19:52 +0200 Subject: [PATCH] test(matcher): test alias with children --- __tests__/matcher.spec.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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', () => { -- 2.47.2