mardi 28 avril 2020

HTML image gets rendered on top of Karma

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:

enter image description here 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