All files / src/testing-helpers/marble-testing/helpers marble-testing2.hlpr.ts

69.23% Statements 9/13
50% Branches 4/8
100% Functions 4/4
69.23% Lines 9/13
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38        2x     2x       7x     7x       9x     9x       2x     2x     1x            
// tslint:disable-next-line:prefer-const
declare var global, expect;
 
function hot() {
  Iif (!global.rxTestScheduler) {
    throw new Error('tried to use hot() in async test');
  }
  return global.rxTestScheduler.createHotObservable.apply(global.rxTestScheduler, arguments);
}
 
function cold() {
  Iif (!global.rxTestScheduler) {
    throw new Error('tried to use cold() in async test');
  }
  return global.rxTestScheduler.createColdObservable.apply(global.rxTestScheduler, arguments);
}
 
function expectObservable() {
  Iif (!global.rxTestScheduler) {
    throw new Error('tried to use expectObservable() in async test');
  }
  return global.rxTestScheduler.expectObservable.apply(global.rxTestScheduler, arguments);
}
 
function expectSubscriptions() {
  Iif (!global.rxTestScheduler) {
    throw new Error('tried to use expectSubscriptions() in async test');
  }
  return global.rxTestScheduler.expectSubscriptions.apply(global.rxTestScheduler, arguments);
}
 
export default {
  hot: hot,
  cold: cold,
  expectObservable: expectObservable,
  expectSubscriptions: expectSubscriptions,
};