File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,13 @@ describe('ChampionsComponent', () => {
6969
7070 it ( 'should navigate when \'Enter\' is hit and one champion is available' ,
7171 inject ( [ ChampionsComponent ] , ( component ) => {
72- spyOn ( component . router , 'navigate' ) ;
72+ spyOn ( component . router , 'navigate' ) . and . callFake ( function ( ) {
73+ return {
74+ catch : function ( callback ) {
75+ return callback ( ) ;
76+ }
77+ } ;
78+ } ) ;
7379 expect ( component . router . navigate ) . not . toHaveBeenCalled ( ) ;
7480 component . champions = {
7581 data : [ {
@@ -85,7 +91,13 @@ describe('ChampionsComponent', () => {
8591
8692 it ( 'should not navigate when \'Enter\' is hit and multiple champions are available' ,
8793 inject ( [ ChampionsComponent ] , ( component ) => {
88- spyOn ( component . router , 'navigate' ) ;
94+ spyOn ( component . router , 'navigate' ) . and . callFake ( function ( ) {
95+ return {
96+ catch : function ( callback ) {
97+ return callback ( ) ;
98+ }
99+ } ;
100+ } ) ;
89101 expect ( component . router . navigate ) . not . toHaveBeenCalled ( ) ;
90102 component . champions = {
91103 data : [
You can’t perform that action at this time.
0 commit comments