@@ -79,9 +79,8 @@ export function main() {
7979 expect ( url ) . toEqual ( 'first/one/second/two' ) ;
8080 } ) ;
8181
82- it ( 'should geneate params as an empty StringMap when no params are given' , ( ) => {
83- registry . config ( RootHostCmp ,
84- new Route ( { path : '/test/...' , component : DummyParentParamCmp , as : 'test' } ) ) ;
82+ it ( 'should generate params as an empty StringMap when no params are given' , ( ) => {
83+ registry . config ( RootHostCmp , new Route ( { path : '/test' , component : DummyCmpA , as : 'test' } ) ) ;
8584 var instruction = registry . generate ( [ 'test' ] , RootHostCmp ) ;
8685 expect ( instruction . component . params ) . toEqual ( { } ) ;
8786 } ) ;
@@ -232,6 +231,13 @@ export function main() {
232231 }
233232 } ) ;
234233
234+ it ( 'should throw when linkParams are not terminal' , ( ) => {
235+ registry . config ( RootHostCmp ,
236+ new Route ( { path : '/first/...' , component : DummyParentCmp , as : 'first' } ) ) ;
237+ expect ( ( ) => { registry . generate ( [ 'first' ] , RootHostCmp ) ; } )
238+ . toThrowError ( 'Link "["first"]" does not resolve to a terminal instruction.' ) ;
239+ } ) ;
240+
235241 it ( 'should match matrix params on child components and query params on the root component' ,
236242 inject ( [ AsyncTestCompleter ] , ( async ) => {
237243 registry . config ( RootHostCmp , new Route ( { path : '/first/...' , component : DummyParentCmp } ) ) ;
0 commit comments