Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalerba committed Mar 2, 2017
1 parent 934bfad commit 8a2dcea
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/lib/datepicker/datepicker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {MdDatepickerInput} from './datepicker-input';
import {SimpleDate} from '../core/datetime/simple-date';
import {FormControl, FormsModule, ReactiveFormsModule} from '@angular/forms';
import {By} from '@angular/platform-browser';
import {dispatchFakeEvent} from '../core/testing/dispatch-events';


describe('MdDatepicker', () => {
Expand Down Expand Up @@ -124,9 +125,9 @@ describe('MdDatepicker', () => {
testComponent = fixture.componentInstance;
});

//it('should throw when opened with no registered inputs', () => {
// expect(() => testComponent.datepicker.openStandardUi()).toThrow();
//});
it('should throw when opened with no registered inputs', () => {
expect(() => testComponent.datepicker.openStandardUi()).toThrow();
});
});

describe('datepicker with startAt', () => {
Expand Down Expand Up @@ -274,13 +275,6 @@ function detectModelChanges(fixture: ComponentFixture<any>) {
fixture.detectChanges();
}

// TODO(mmalerba): Switch to shared testing utils
function dispatchFakeEvent(el: Element, type: string) {
let event = document.createEvent('Event');
event.initEvent(type, true, true);
el.dispatchEvent(event);
}


@Component({
template: `<input [mdDatepicker]="d" value="1/1/2020"><md-datepicker #d></md-datepicker>`,
Expand Down

0 comments on commit 8a2dcea

Please sign in to comment.