vulnerability-page.component.spec.ts 1.22 KB
Newer Older
1
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
2 3 4
import { ClarityModule } from '@clr/angular';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
AllForNothing's avatar
AllForNothing committed
5
import { AppConfigService } from "../services/app-config.service";
FangyuanCheng's avatar
FangyuanCheng committed
6 7 8 9 10
import { VulnerabilityPageComponent } from './vulnerability-page.component';

describe('VulnerabilityPageComponent', () => {
  let component: VulnerabilityPageComponent;
  let fixture: ComponentFixture<VulnerabilityPageComponent>;
11
  let fakeAppConfigService = null;
12
  beforeEach(waitForAsync(() => {
FangyuanCheng's avatar
FangyuanCheng committed
13
    TestBed.configureTestingModule({
14 15 16 17 18 19 20 21 22 23 24 25 26
      schemas: [
        CUSTOM_ELEMENTS_SCHEMA
      ],
      imports: [
        ClarityModule,
        TranslateModule.forRoot()
      ],
      providers: [
        TranslateService,
        { provide: AppConfigService, useValue: fakeAppConfigService }
      ],
      declarations: [VulnerabilityPageComponent]
    }).compileComponents();
FangyuanCheng's avatar
FangyuanCheng committed
27 28 29 30 31 32 33 34 35 36 37 38
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(VulnerabilityPageComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});