UNPKG

ngx-easy-d3

Version:

Build an Angular library compatible with AoT compilation and Tree shaking like an official package

30 lines (21 loc) 779 B
import { SumComponent, SumService } from '../../src/ngx-easy-d3'; import { TestBed, ComponentFixture, async } from '@angular/core/testing'; describe('Component: SumComponent', () => { let fixture: ComponentFixture<SumComponent>; let comp: SumComponent; beforeEach(async () => { TestBed.configureTestingModule({ imports: [], providers: [ SumService ], declarations: [SumComponent] }).compileComponents(); fixture = TestBed.createComponent(SumComponent); comp = fixture.componentInstance; }); it('should render the sum', (() => { fixture.detectChanges(); expect(fixture.debugElement.nativeElement.textContent).toContain('887'); })); });