import{TestBed,async}from"@angular/core/testing";import{RouterTestingModule}from"@angular/router/testing";import{AppComponent}from"./app.component";describe("AppComponent",()=>{beforeEach(async(()=>{TestBed.configureTestingModule({imports:[RouterTestingModule],declarations:[AppComponent]}).compileComponents();}));it("should create the app",()=>{constfixture=TestBed.createComponent(AppComponent);constapp=fixture.debugElement.componentInstance;expect(app).toBeTruthy();});it(`should have as title 'black-dashboard-angular'`,()=>{constfixture=TestBed.createComponent(AppComponent);constapp=fixture.debugElement.componentInstance;expect(app.title).toEqual("black-dashboard-angular");});it("should render title in a h1 tag",()=>{constfixture=TestBed.createComponent(AppComponent);fixture.detectChanges();constcompiled=fixture.debugElement.nativeElement;expect(compiled.querySelector("h1").textContent).toContain("Welcome to black-dashboard-angular!");});});