blob: 2c67d5d7da4301c42210227d0c5e44ccaa297e5e (
plain)
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
32
33
34
35
36
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { MatPaginatorModule, MatSortModule, MatTableModule } from '@angular/material';
import { DataChartComponent } from './data-chart.component';
describe('DataChartComponent', () => {
let component: DataChartComponent;
let fixture: ComponentFixture<DataChartComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DataChartComponent ],
imports: [
NoopAnimationsModule,
MatPaginatorModule,
MatSortModule,
MatTableModule,
]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DataChartComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should compile', () => {
expect(component).toBeTruthy();
});
it('should test ngOnInit method',()=>{
expect(component.dataSource).toBeDefined();
})
});
|