apps/ng2-charts-demo/src/app/dynamic-chart/dynamic-chart.component.spec.ts
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { DynamicChartComponent } from './dynamic-chart.component';
import { provideCharts, withDefaultRegisterables } from 'ng2-charts';
import { provideNoopAnimations } from '@angular/platform-browser/animations';
import { provideHighlightjs } from '../app.config';
describe('DynamicChartComponent', () => {
let component: DynamicChartComponent;
let fixture: ComponentFixture<DynamicChartComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
providers: [
provideHighlightjs(),
provideNoopAnimations(),
provideCharts(withDefaultRegisterables()),
],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DynamicChartComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});