Mailspring/spec/components/nylas-calendar/test-data-source.es6
2016-10-17 18:07:35 -07:00

17 lines
460 B
JavaScript

// import Rx from 'rx-lite-testing'
import {CalendarDataSource} from 'nylas-exports'
import {events} from './fixtures/events'
export default class TestDataSource extends CalendarDataSource {
buildObservable({startTime, endTime}) {
this.endTime = endTime;
this.startTime = startTime;
return this
}
subscribe(onNext) {
onNext({events})
this.unsubscribe = jasmine.createSpy("unusbscribe");
return {dispose: this.unsubscribe}
}
}