-
Notifications
You must be signed in to change notification settings - Fork 13
/
data.component.spec.ts
31 lines (27 loc) · 1.06 KB
/
data.component.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DataComponent } from './data.component';
import { AgGridModule } from 'ag-grid-angular';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { RouterTestingModule } from '@angular/router/testing';
describe('DataComponent', () => {
let component: DataComponent;
let fixture: ComponentFixture<DataComponent>;
// TODO mock the data service and remove http and router
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [DataComponent],
imports: [AgGridModule, HttpClientTestingModule, RouterTestingModule],
providers: [HttpClientTestingModule, RouterTestingModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DataComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});