Mailspring/spec/components/nylas-calendar/test-data-source.es6
Evan Morikawa b29d5ac75b tests(calendar): adding calendar and scheduler tests
Summary: Adding tests

Test Plan: Tests

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2892
2016-04-19 11:54:15 -07:00

17 lines
460 B
JavaScript

// import Rx from 'rx-lite-testing'
import {events} from './fixtures/events'
import {CalendarDataSource} from 'nylas-exports'
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}
}
}