This repository has been archived by the owner. It is now read-only.
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (35 sloc) 1.07 KB
declare var global;
function hot(...args: any[]) {
if (!global.rxTestScheduler) {
throw 'tried to use hot() in async test';
}
return global.rxTestScheduler.createHotObservable.apply(global.rxTestScheduler, arguments);
}
function cold() {
if (!global.rxTestScheduler) {
throw 'tried to use cold() in async test';
}
return global.rxTestScheduler.createColdObservable.apply(global.rxTestScheduler, arguments);
}
function expectObservable(...args: any[]) {
if (!global.rxTestScheduler) {
throw 'tried to use expectObservable() in async test';
}
return global.rxTestScheduler.expectObservable.apply(global.rxTestScheduler, arguments);
}
function expectSubscriptions(...args: any[]) {
if (!global.rxTestScheduler) {
throw 'tried to use expectSubscriptions() in async test';
}
return global.rxTestScheduler.expectSubscriptions.apply(global.rxTestScheduler, arguments);
}
function assertDeepEqual(actual, expected) {
(<any> expect(actual)).toDeepEqual(expected);
}
export {
hot,
cold,
expectObservable,
expectSubscriptions,
assertDeepEqual
};