mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
test(router): test empty url with global redirect
This commit is contained in:
parent
15f27b5455
commit
b6ec22de6b
1 changed files with 11 additions and 0 deletions
|
|
@ -90,6 +90,17 @@ describe('applyRedirects', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it("should redirect empty path (global redirect)", () => {
|
||||
checkRedirect([
|
||||
{path: 'a', component: ComponentA, children: [
|
||||
{path: 'b', component: ComponentB},
|
||||
]},
|
||||
{path: '', redirectTo: '/a/b'}
|
||||
], "", t => {
|
||||
compareTrees(t, tree('a/b'));
|
||||
});
|
||||
});
|
||||
|
||||
xit("should support nested redirects", () => {
|
||||
checkRedirect([
|
||||
{path: 'a', component: ComponentA, children: [
|
||||
|
|
|
|||
Loading…
Reference in a new issue