@@ -577,8 +577,9 @@ describe('DocViewerComponent', () => {
577
577
expect ( swapViewsSpy ) . not . toHaveBeenCalled ( ) ;
578
578
expect ( docViewer . nextViewContainer . innerHTML ) . toBe ( '' ) ;
579
579
expect ( logger . output . error ) . toEqual ( [
580
- [ `[DocViewer] Error preparing document 'foo': ${ error . stack } ` ] ,
580
+ [ jasmine . any ( Error ) ]
581
581
] ) ;
582
+ expect ( logger . output . error [ 0 ] [ 0 ] . message ) . toEqual ( `[DocViewer] Error preparing document 'foo': ${ error . stack } ` ) ;
582
583
expect ( TestBed . get ( Meta ) . addTag ) . toHaveBeenCalledWith ( { name : 'googlebot' , content : 'noindex' } ) ;
583
584
expect ( TestBed . get ( Meta ) . addTag ) . toHaveBeenCalledWith ( { name : 'robots' , content : 'noindex' } ) ;
584
585
} ) ;
@@ -598,8 +599,9 @@ describe('DocViewerComponent', () => {
598
599
expect ( swapViewsSpy ) . not . toHaveBeenCalled ( ) ;
599
600
expect ( docViewer . nextViewContainer . innerHTML ) . toBe ( '' ) ;
600
601
expect ( logger . output . error ) . toEqual ( [
601
- [ `[DocViewer] Error preparing document 'bar': ${ error . stack } ` ] ,
602
+ [ jasmine . any ( Error ) ]
602
603
] ) ;
604
+ expect ( logger . output . error [ 0 ] [ 0 ] . message ) . toEqual ( `[DocViewer] Error preparing document 'bar': ${ error . stack } ` ) ;
603
605
expect ( TestBed . get ( Meta ) . addTag ) . toHaveBeenCalledWith ( { name : 'googlebot' , content : 'noindex' } ) ;
604
606
expect ( TestBed . get ( Meta ) . addTag ) . toHaveBeenCalledWith ( { name : 'robots' , content : 'noindex' } ) ;
605
607
} ) ;
@@ -619,8 +621,9 @@ describe('DocViewerComponent', () => {
619
621
expect ( swapViewsSpy ) . not . toHaveBeenCalled ( ) ;
620
622
expect ( docViewer . nextViewContainer . innerHTML ) . toBe ( '' ) ;
621
623
expect ( logger . output . error ) . toEqual ( [
622
- [ `[DocViewer] Error preparing document 'baz': ${ error . stack } ` ] ,
624
+ [ jasmine . any ( Error ) ]
623
625
] ) ;
626
+ expect ( logger . output . error [ 0 ] [ 0 ] . message ) . toEqual ( `[DocViewer] Error preparing document 'baz': ${ error . stack } ` ) ;
624
627
expect ( TestBed . get ( Meta ) . addTag ) . toHaveBeenCalledWith ( { name : 'googlebot' , content : 'noindex' } ) ;
625
628
expect ( TestBed . get ( Meta ) . addTag ) . toHaveBeenCalledWith ( { name : 'robots' , content : 'noindex' } ) ;
626
629
} ) ;
@@ -640,8 +643,9 @@ describe('DocViewerComponent', () => {
640
643
expect ( swapViewsSpy ) . toHaveBeenCalledTimes ( 1 ) ;
641
644
expect ( docViewer . nextViewContainer . innerHTML ) . toBe ( '' ) ;
642
645
expect ( logger . output . error ) . toEqual ( [
643
- [ `[DocViewer] Error preparing document 'qux': ${ error . stack } ` ] ,
646
+ [ jasmine . any ( Error ) ]
644
647
] ) ;
648
+ expect ( logger . output . error [ 0 ] [ 0 ] . message ) . toEqual ( `[DocViewer] Error preparing document 'qux': ${ error . stack } ` ) ;
645
649
expect ( TestBed . get ( Meta ) . addTag ) . toHaveBeenCalledWith ( { name : 'googlebot' , content : 'noindex' } ) ;
646
650
expect ( TestBed . get ( Meta ) . addTag ) . toHaveBeenCalledWith ( { name : 'robots' , content : 'noindex' } ) ;
647
651
} ) ;
@@ -658,8 +662,9 @@ describe('DocViewerComponent', () => {
658
662
expect ( swapViewsSpy ) . toHaveBeenCalledTimes ( 1 ) ;
659
663
expect ( docViewer . nextViewContainer . innerHTML ) . toBe ( '' ) ;
660
664
expect ( logger . output . error ) . toEqual ( [
661
- [ `[DocViewer] Error preparing document 'qux': ${ error } ` ] ,
665
+ [ jasmine . any ( Error ) ]
662
666
] ) ;
667
+ expect ( logger . output . error [ 0 ] [ 0 ] . message ) . toEqual ( `[DocViewer] Error preparing document 'qux': ${ error } ` ) ;
663
668
expect ( TestBed . get ( Meta ) . addTag ) . toHaveBeenCalledWith ( { name : 'googlebot' , content : 'noindex' } ) ;
664
669
expect ( TestBed . get ( Meta ) . addTag ) . toHaveBeenCalledWith ( { name : 'robots' , content : 'noindex' } ) ;
665
670
} ) ;
0 commit comments