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

39 lines (35 loc) 1.4 kB
import { TestBed, async } from '@angular/core/testing'; import { AppComponent } from './app.component'; import { NgxMatDrpModule } from '../../public_api'; import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; describe('AppComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ AppComponent ], imports: [BrowserAnimationsModule , NgxMatDrpModule] }).compileComponents(); })); it('should create the app', async(() => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.componentInstance; expect(app).toBeTruthy(); })); it('should setup presets', async(() => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.componentInstance; spyOn(app, 'setupPresets'); fixture.detectChanges(); expect(app.setupPresets).toHaveBeenCalled(); expect(app.presets).toBeDefined(); })); it('should setup date-range-picker options with required props', async(() => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.componentInstance; fixture.detectChanges(); expect(app.options.presets).toBeDefined(); expect(app.options.format).toBeDefined(); expect(app.options.range).toBeDefined(); })); });