forked from ReactiveX/rxjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index-spec.ts
85 lines (75 loc) · 2.61 KB
/
index-spec.ts
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import * as index from '../src/index';
import { expect } from 'chai';
describe('index', () => {
it('should export Observable', () => {
expect(index.Observable).to.exist;
expect(index.ConnectableObservable).to.exist;
// Interfaces can be checked by creating a variable of that type
let operator: index.Operator<any, any>;
});
it('should export the Subject types', () => {
expect(index.Subject).to.exist;
expect(index.BehaviorSubject).to.exist;
expect(index.ReplaySubject).to.exist;
expect(index.AsyncSubject).to.exist;
});
it('should export the schedulers', () => {
expect(index.asapScheduler).to.exist;
expect(index.asyncScheduler).to.exist;
expect(index.queueScheduler).to.exist;
expect(index.animationFrameScheduler).to.exist;
expect(index.VirtualTimeScheduler).to.exist;
expect(index.VirtualAction).to.exist;
});
it('should export Subscription', () => {
expect(index.Subscription).to.exist;
expect(index.Subscriber).to.exist;
});
it('should export Notification', () => {
expect(index.Notification).to.exist;
});
it('should export the appropriate utilities', () => {
expect(index.pipe).to.exist;
expect(index.noop).to.exist;
expect(index.identity).to.exist;
});
it('should export error types', () => {
expect(index.ArgumentOutOfRangeError).to.exist;
expect(index.EmptyError).to.exist;
expect(index.ObjectUnsubscribedError).to.exist;
expect(index.UnsubscriptionError).to.exist;
expect(index.TimeoutError).to.exist;
});
it('should export constants', () => {
expect(index.EMPTY).to.exist;
expect(index.NEVER).to.exist;
});
it('should export static observable creator functions', () => {
expect(index.bindCallback).to.exist;
expect(index.bindNodeCallback).to.exist;
expect(index.combineLatest).to.exist;
expect(index.concat).to.exist;
expect(index.defer).to.exist;
expect(index.empty).to.exist;
expect(index.forkJoin).to.exist;
expect(index.from).to.exist;
expect(index.fromEvent).to.exist;
expect(index.fromEventPattern).to.exist;
expect(index.generate).to.exist;
expect(index.iif).to.exist;
expect(index.interval).to.exist;
expect(index.merge).to.exist;
expect(index.of).to.exist;
expect(index.onErrorResumeNext).to.exist;
expect(index.pairs).to.exist;
expect(index.race).to.exist;
expect(index.range).to.exist;
expect(index.throwError).to.exist;
expect(index.timer).to.exist;
expect(index.using).to.exist;
expect(index.zip).to.exist;
});
it('should expose configuration', () => {
expect(index.config).to.exist;
});
});