Mailspring/spec/components/nylas-calendar/test-data-source.es6

18 lines
460 B
Text
Raw Normal View History

// import Rx from 'rx-lite-testing'
import {CalendarDataSource} from 'nylas-exports'
2016-10-18 08:59:33 +08:00
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}
}
}