test(router): test empty url with global redirect

This commit is contained in:
vsavkin 2016-06-14 15:29:42 -07:00
parent 15f27b5455
commit b6ec22de6b
1 changed files with 11 additions and 0 deletions

View File

@ -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: [