fix(router): throw an error when encounter undefined route (#12389)
This commit is contained in:

committed by
Victor Berchet

parent
3052fb234f
commit
77dc1ab675
@ -15,6 +15,12 @@ describe('config', () => {
|
||||
validateConfig([{path: 'a', redirectTo: 'b'}, {path: 'b', component: ComponentA}]);
|
||||
});
|
||||
|
||||
it('should throw for undefined route', () => {
|
||||
expect(() => {
|
||||
validateConfig([{path: 'a', component: ComponentA}, , {path: 'b', component: ComponentB}]);
|
||||
}).toThrowError();
|
||||
});
|
||||
|
||||
it('should throw when Array is passed', () => {
|
||||
expect(() => {
|
||||
validateConfig([
|
||||
|
Reference in New Issue
Block a user