How come a logo which I have in my navbar component is rendered in Karma when I run "ng test"?
When running "ng test" it appears like in the image below:
The following code is from my app.component.spec.ts file.
describe("AppComponent", () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;
let de: DebugElement
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
AngularFireDatabaseModule,
AngularFireAuthModule,
AngularFirestoreModule,
AngularFireStorageModule,
AngularFireModule.initializeApp( environment.firebase)],
declarations: [
AppComponent,
NavbarComponent],
providers:
[
DatabaseService,
],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AppComponent);
component = fixture.componentInstance;
de = fixture.debugElement;
fixture.detectChanges();
});
it("should create", () => {
expect(component).toBeTruthy();
});
});
Aucun commentaire:
Enregistrer un commentaire