@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,421 lines (1,420 loc) • 442 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "Literal",
"value": "use strict",
"raw": "\"use strict\"",
"range": [
0,
12
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 12
}
}
},
"range": [
0,
13
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 13
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "chai_1",
"range": [
18,
24
],
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 10
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
27,
34
],
"loc": {
"start": {
"line": 2,
"column": 13
},
"end": {
"line": 2,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "chai",
"raw": "'chai'",
"range": [
35,
41
],
"loc": {
"start": {
"line": 2,
"column": 21
},
"end": {
"line": 2,
"column": 27
}
}
}
],
"range": [
27,
42
],
"loc": {
"start": {
"line": 2,
"column": 13
},
"end": {
"line": 2,
"column": 28
}
}
},
"range": [
18,
42
],
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 28
}
}
}
],
"kind": "var",
"range": [
14,
43
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 29
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "sinon",
"range": [
48,
53
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 9
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
56,
63
],
"loc": {
"start": {
"line": 3,
"column": 12
},
"end": {
"line": 3,
"column": 19
}
}
},
"arguments": [
{
"type": "Literal",
"value": "sinon",
"raw": "'sinon'",
"range": [
64,
71
],
"loc": {
"start": {
"line": 3,
"column": 20
},
"end": {
"line": 3,
"column": 27
}
}
}
],
"range": [
56,
72
],
"loc": {
"start": {
"line": 3,
"column": 12
},
"end": {
"line": 3,
"column": 28
}
}
},
"range": [
48,
72
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 28
}
}
}
],
"kind": "var",
"range": [
44,
73
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 29
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Rx",
"range": [
78,
80
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 6
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
83,
90
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 16
}
}
},
"arguments": [
{
"type": "Literal",
"value": "../../dist/cjs/Rx",
"raw": "'../../dist/cjs/Rx'",
"range": [
91,
110
],
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 36
}
}
}
],
"range": [
83,
111
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 37
}
}
},
"range": [
78,
111
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 37
}
}
}
],
"kind": "var",
"range": [
74,
112
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 38
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "animationFrame",
"range": [
117,
131
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 18
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
134,
136
],
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"name": "Scheduler",
"range": [
137,
146
],
"loc": {
"start": {
"line": 5,
"column": 24
},
"end": {
"line": 5,
"column": 33
}
}
},
"range": [
134,
146
],
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 33
}
}
},
"property": {
"type": "Identifier",
"name": "animationFrame",
"range": [
147,
161
],
"loc": {
"start": {
"line": 5,
"column": 34
},
"end": {
"line": 5,
"column": 48
}
}
},
"range": [
134,
161
],
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 48
}
}
},
"range": [
117,
161
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 48
}
}
}
],
"kind": "var",
"range": [
113,
162
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 49
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {Scheduler} ",
"range": [
163,
187
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 24
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
188,
196
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Scheduler.animationFrame",
"raw": "'Scheduler.animationFrame'",
"range": [
197,
223
],
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 35
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
243,
245
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 6
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should exist",
"raw": "'should exist'",
"range": [
246,
260
],
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 21
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "chai_1",
"range": [
284,
290
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 14
}
}
},
"property": {
"type": "Identifier",
"name": "expect",
"range": [
291,
297
],
"loc": {
"start": {
"line": 9,
"column": 15
},
"end": {
"line": 9,
"column": 21
}
}
},
"range": [
284,
297
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 21
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "animationFrame",
"range": [
298,
312
],
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 36
}
}
}
],
"range": [
284,
313
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 37
}
}
},
"property": {
"type": "Identifier",
"name": "exist",
"range": [
314,
319
],
"loc": {
"start": {
"line": 9,
"column": 38
},
"end": {
"line": 9,
"column": 43
}
}
},
"range": [
284,
319
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 43
}
}
},
"range": [
284,
320
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 44
}
}
}
],
"range": [
274,
326
],
"loc": {
"start": {
"line": 8,
"column": 35
},
"end": {
"line": 10,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
262,
326
],
"loc": {
"start": {
"line": 8,
"column": 23
},
"end": {
"line": 10,
"column": 5
}
}
}
],
"range": [
243,
327
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 10,
"column": 6
}
},
"_esdocTestId": 2343,
"_esdocTestName": "it2343"
},
"range": [
243,
328
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 10,
"column": 7
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
333,
335
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 6
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should act like the async scheduler if delay > 0",
"raw": "'should act like the async scheduler if delay > 0'",
"range": [
336,
386
],
"loc": {
"start": {
"line": 11,
"column": 7
},
"end": {
"line": 11,
"column": 57
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "actionHappened",
"range": [
414,
428
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 26
}
}
},
"init": {
"type": "Literal",
"value": false,
"raw": "false",
"range": [
431,
436
],
"loc": {
"start": {
"line": 12,
"column": 29
},
"end": {
"line": 12,
"column": 34
}
}
},
"range": [
414,
436
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 34
}
}
}
],
"kind": "var",
"range": [
410,
437
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 35
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "sandbox",
"range": [
450,
457
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 19
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "sinon",
"range": [
460,
465
],
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "sandbox",
"range": [
466,
473
],
"loc": {
"start": {
"line": 13,
"column": 28
},
"end": {
"line": 13,
"column": 35
}
}
},
"range": [
460,
473
],
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"column": 35
}
}
},
"property": {
"type": "Identifier",
"name": "create",
"range": [
474,
480
],
"loc": {
"start": {
"line": 13,
"column": 36
},
"end": {
"line": 13,
"column": 42
}
}
},
"range": [
460,
480
],
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"column": 42
}
}
},
"arguments": [],
"range": [
460,
482
],
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"column": 44
}
}
},
"range": [
450,
482
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 44
}
}
}
],
"kind": "var",
"range": [
446,
483
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 45
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "fakeTimer",
"range": [
496,
505
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 21
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "sandbox",
"range": [
508,
515
],
"loc": {
"start": {
"line": 14,
"column": 24
},
"end": {
"line": 14,
"column": 31
}
}
},
"property": {
"type": "Identifier",
"name": "useFakeTimers",
"range": [
516,
529
],
"loc": {
"start": {
"line": 14,
"column": 32
},
"end": {
"line": 14,
"column": 45
}
}
},
"range": [
508,
529
],
"loc": {
"start": {
"line": 14,
"column": 24
},
"end": {
"line": 14,
"column": 45
}
}
},
"arguments": [],
"range": [
508,
531
],
"loc": {
"start": {
"line": 14,
"column": 24
},
"end": {
"line": 14,
"column": 47
}
}
},
"range": [
496,
531
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 47
}
}
}
],
"kind": "var",
"range": [
492,
532
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 48
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "animationFrame",
"range": [
541,
555
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 22
}
}
},
"property": {
"type": "Identifier",
"name": "schedule",
"range": [
556,
564
],
"loc": {
"start": {
"line": 15,
"column": 23
},
"end": {
"line": 15,
"column": 31
}
}
},
"range": [
541,
564
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 31
}
}
},
"arguments": [
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "actionHappened",
"range": [
591,
605
],
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 26
}
}
},
"right": {
"type": "Literal",
"value": true,
"raw": "true",
"range": [
608,
612
],
"loc": {
"start": {
"line": 16,
"column": 29
},
"end": {
"line": 16,
"column": 33
}
}
},
"range": [
591,
612
],
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 33
}
}
},
"range": [
591,
613
],
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 34
}
}
}
],
"range": [
577,
623
],
"loc": {
"start": {
"line": 15,
"column": 44
},
"end": {
"line": 17,
"column": 9
}
}
},
"generator": false,
"expression": false,
"range": [
565,
623
],
"loc": {
"start": {