UNPKG

ng-mat-daterange-picker

Version:

[![CircleCI](https://circleci.com/gh/ashishgkwd/ngx-mat-daterange-picker.svg?style=shield)](https://circleci.com/gh/ashishgkwd/ngx-mat-daterange-picker) [![Maintainability](https://api.codeclimate.com/v1/badges/2b0d09a866f6d2ed139c/maintainability)](https

36 lines (29 loc) 921 B
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { PresetsComponent } from './presets.component'; describe('PresetsComponent', () => { let component: PresetsComponent; let fixture: ComponentFixture<PresetsComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ PresetsComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(PresetsComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should be created', () => { expect(component).toBeTruthy(); }); it('should emit preset change', () => { const testEvent: any = {name: 'testEvent'}; component.presetChanged.subscribe( val => { expect(val).toEqual(testEvent); } ); component.setPresetPeriod(testEvent); }) });