import { TestBed, async, ComponentFixture } from '@angular/core/testing'; import { NgZorroAntdModule } from 'ng-zorro-antd'; import { RouterLinkStubDirective, RouterOutletStubComponent } from '../testing/router-stubs'; import { AppComponent } from './app.component'; import { DebugElement } from '@angular/core'; import { By } from '@angular/platform-browser'; let comp: AppComponent; let fixture: ComponentFixture; describe('AppComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ NgZorroAntdModule ], declarations: [ RouterLinkStubDirective, RouterOutletStubComponent, AppComponent ], }) .compileComponents() .then(() => { fixture = TestBed.createComponent(AppComponent); comp = fixture.componentInstance; }); })); it(`should have as title 'app'`, async(() => { expect(comp.title).toEqual('app'); })); // it('should render title in a h1 tag', async(() => { // fixture.detectChanges(); // const compiled = fixture.debugElement.nativeElement; // expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); // })); });