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

29 lines (24 loc) 840 B
import { TestBed, inject } from '@angular/core/testing'; import { RangeStoreService, DATE } from './range-store.service'; import { InjectionToken } from '@angular/core'; describe('RangeStoreService', () => { beforeEach(() => { TestBed.configureTestingModule({ providers: [ RangeStoreService, {provide: DATE, useValue: new Date()}] }); }); it('should be created', inject([RangeStoreService], (service: RangeStoreService) => { expect(service).toBeTruthy(); })); it('should update the store and emit range update', inject([RangeStoreService], (service:RangeStoreService) => { let rangeUpdateSub = service.rangeUpdate$.subscribe( val => { expect(val).toBeTruthy(); } ) service.updateRange(); rangeUpdateSub.unsubscribe(); })) });