forked from ReactiveX/rxjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.markdown-doctest-setup.js
55 lines (47 loc) · 1.15 KB
/
.markdown-doctest-setup.js
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
'use strict';
var Rx = require(__dirname);
var marbleTesting = require('./spec-js/helpers/marble-testing');
global.rxTestScheduler = new Rx.TestScheduler(marbleTesting.assertDeepEqual);
function it(callback) {
callback();
}
it.asDiagram = function asDiagram() {
return function (spec, callback) {
callback();
}
};
module.exports = {
require: {
'@reactivex/rxjs': Rx
},
globals: {
document: {
querySelector: function () {
return {
addEventListener: function () {},
removeEventListener: function () {}
}
}
},
hot: marbleTesting.hot,
cold: marbleTesting.cold,
expectObservable: marbleTesting.expectObservable,
expectSubscriptions: marbleTesting.expectSubscriptions,
assertDeepEqual: marbleTesting.assertDeepEqual,
Rx: Rx,
setTimeout: setTimeout,
setInterval: setInterval,
clearInterval: clearInterval,
Observable: Rx.Observable,
someObservable: Rx.Observable.range(1, 10),
it: it
},
regexRequire: {
'rxjs/(.*)': function (_, moduleName) {
return require(__dirname + '/dist/cjs/' + moduleName);
}
},
babel: {
stage: 0
}
};