1- import { HttpClient , HttpHandler } from '@angular/common/http' ;
1+ import { HttpClientModule , HttpHandler } from '@angular/common/http' ;
22import { HttpClientTestingModule } from '@angular/common/http/testing' ;
33import { ComponentFixture , TestBed } from '@angular/core/testing' ;
44import { MatAutocomplete } from '@angular/material/autocomplete' ;
@@ -12,8 +12,8 @@ describe('MatrixComponent', () => {
1212
1313 beforeEach ( async ( ) => {
1414 await TestBed . configureTestingModule ( {
15- providers : [ ymlService , HttpClient , HttpHandler , HttpClientTestingModule ] ,
16- imports : [ RouterTestingModule ] ,
15+ providers : [ ymlService , HttpClientTestingModule ] ,
16+ imports : [ RouterTestingModule , HttpClientModule ] ,
1717 declarations : [ MatrixComponent , MatAutocomplete ] ,
1818 } ) . compileComponents ( ) ;
1919 } ) ;
@@ -25,6 +25,13 @@ describe('MatrixComponent', () => {
2525 } ) ;
2626
2727 it ( 'should create' , ( ) => {
28+ fixture . detectChanges ( ) ;
2829 expect ( component ) . toBeTruthy ( ) ;
2930 } ) ;
31+
32+ it ( 'check for table generation' , ( ) => {
33+ const HTMLElement : HTMLElement = fixture . nativeElement ;
34+ const table = HTMLElement . querySelector ( 'table' ) ! ;
35+ expect ( table ) . toBeTruthy ( ) ;
36+ } ) ;
3037} ) ;
0 commit comments