Browse Source

web-ui: Fix navbar.component.spec

prometheus-integration
jonsadev 6 years ago
parent
commit
4f20fb4ebf
  1. 23
      web-ui/src/app/components/navbar/navbar.component.spec.ts

23
web-ui/src/app/components/navbar/navbar.component.spec.ts

@ -2,13 +2,34 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NavbarComponent } from './navbar.component';
import { TranslateModule } from '@ngx-translate/core';
import { RouterModule } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { APP_BASE_HREF, LocationStrategy, PathLocationStrategy, Location } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
describe('NavbarComponent', () => {
let component: NavbarComponent;
let fixture: ComponentFixture<NavbarComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ NavbarComponent ]
declarations: [
NavbarComponent
],
imports: [
TranslateModule.forRoot(),
RouterModule,
RouterTestingModule
],
providers: [
{ provide: APP_BASE_HREF, useValue: '/' },
{ provide: LocationStrategy, useClass: PathLocationStrategy },
Location
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
.compileComponents();
}));

Loading…
Cancel
Save