From fea216db12404b19d4c8ed4b55921da59bd7a6d0 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Thu, 16 Jun 2016 15:38:10 -0700 Subject: [PATCH] fix(router): fixes a type issue in a test --- modules/@angular/router/test/config.spec.ts | 25 ++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/modules/@angular/router/test/config.spec.ts b/modules/@angular/router/test/config.spec.ts index 9ead702d83..5812bcb7a9 100644 --- a/modules/@angular/router/test/config.spec.ts +++ b/modules/@angular/router/test/config.spec.ts @@ -4,17 +4,19 @@ describe('config', () => { describe("validateConfig", () => { it("should not throw when no errors", () => { validateConfig([ - { path: '', redirectTo: 'b' }, - { path: 'b', component: ComponentA } + {path: '', redirectTo: 'b'}, + {path: 'b', component: ComponentA} ]); }); it("should throw when redirectTo and children are used together", () => { expect(() => { validateConfig([ - { path: 'a', redirectTo: 'b', children: [ + { + path: 'a', redirectTo: 'b', children: [ {path: 'b', component: ComponentA} - ] } + ] + } ]); }).toThrowError(`Invalid configuration of route 'a': redirectTo and children cannot be used together`); }); @@ -22,7 +24,7 @@ describe('config', () => { it("should throw when component and redirectTo are used together", () => { expect(() => { validateConfig([ - { path: 'a', component: ComponentA, redirectTo: 'b' } + {path: 'a', component: ComponentA, redirectTo: 'b'} ]); }).toThrowError(`Invalid configuration of route 'a': redirectTo and component cannot be used together`); }); @@ -30,7 +32,7 @@ describe('config', () => { it("should throw when path is missing", () => { expect(() => { validateConfig([ - { component: '', redirectTo: 'b' } + {component: '', redirectTo: 'b'} ]); }).toThrowError(`Invalid route configuration: routes must have path specified`); }); @@ -38,13 +40,16 @@ describe('config', () => { it("should throw when path starts with a slash", () => { expect(() => { validateConfig([ - { path: '/a', componenta: '', redirectTo: 'b' } + {path: '/a', componenta: '', redirectTo: 'b'} ]); }).toThrowError(`Invalid route configuration of route '/a': path cannot start with a slash`); }); }); }); -class ComponentA {} -class ComponentB {} -class ComponentC {} +class ComponentA { +} +class ComponentB { +} +class ComponentC { +}