ng-mat-daterange-picker
Version:
[](https://circleci.com/gh/ashishgkwd/ngx-mat-daterange-picker) [](https
29 lines (24 loc) • 840 B
text/typescript
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();
}))
});