@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,295 lines (1,294 loc) • 449 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": "Rx",
"range": [
18,
20
],
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 6
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
23,
30
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 16
}
}
},
"arguments": [
{
"type": "Literal",
"value": "../../dist/cjs/Rx",
"raw": "'../../dist/cjs/Rx'",
"range": [
31,
50
],
"loc": {
"start": {
"line": 2,
"column": 17
},
"end": {
"line": 2,
"column": 36
}
}
}
],
"range": [
23,
51
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 37
}
}
},
"range": [
18,
51
],
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 37
}
}
}
],
"kind": "var",
"range": [
14,
52
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 38
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Observable",
"range": [
57,
67
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 14
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
70,
72
],
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "Observable",
"range": [
73,
83
],
"loc": {
"start": {
"line": 3,
"column": 20
},
"end": {
"line": 3,
"column": 30
}
}
},
"range": [
70,
83
],
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 30
}
}
},
"range": [
57,
83
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 30
}
}
}
],
"kind": "var",
"range": [
53,
84
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 31
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {toArray} ",
"range": [
85,
107
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 22
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
108,
116
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.toArray",
"raw": "'Observable.prototype.toArray'",
"range": [
117,
147
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 39
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
167,
176
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "toArray",
"raw": "'toArray'",
"range": [
177,
186
],
"loc": {
"start": {
"line": 6,
"column": 14
},
"end": {
"line": 6,
"column": 23
}
}
}
],
"range": [
167,
187
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 24
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should reduce the values of an observable into an array",
"raw": "'should reduce the values of an observable into an array'",
"range": [
188,
245
],
"loc": {
"start": {
"line": 6,
"column": 25
},
"end": {
"line": 6,
"column": 82
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
273,
275
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
278,
281
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "---a--b--|",
"raw": "'---a--b--|'",
"range": [
282,
294
],
"loc": {
"start": {
"line": 7,
"column": 21
},
"end": {
"line": 7,
"column": 33
}
}
}
],
"range": [
278,
295
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 34
}
}
},
"range": [
273,
295
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 34
}
}
}
],
"kind": "var",
"range": [
269,
296
],
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 35
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1subs",
"range": [
309,
315
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 18
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
318,
330
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 33
}
}
},
"range": [
309,
330
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 33
}
}
}
],
"kind": "var",
"range": [
305,
331
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 34
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
344,
352
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "---------(w|)",
"raw": "'---------(w|)'",
"range": [
355,
370
],
"loc": {
"start": {
"line": 9,
"column": 23
},
"end": {
"line": 9,
"column": 38
}
}
},
"range": [
344,
370
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 38
}
}
}
],
"kind": "var",
"range": [
340,
371
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 39
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
380,
396
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 24
}
}
},
"arguments": [
{
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
397,
399
],
"loc": {
"start": {
"line": 10,
"column": 25
},
"end": {
"line": 10,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "toArray",
"range": [
400,
407
],
"loc": {
"start": {
"line": 10,
"column": 28
},
"end": {
"line": 10,
"column": 35
}
}
},
"range": [
397,
407
],
"loc": {
"start": {
"line": 10,
"column": 25
},
"end": {
"line": 10,
"column": 35
}
}
},
"arguments": [],
"range": [
397,
409
],
"loc": {
"start": {
"line": 10,
"column": 25
},
"end": {
"line": 10,
"column": 37
}
}
}
],
"range": [
380,
410
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 38
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
411,
415
],
"loc": {
"start": {
"line": 10,
"column": 39
},
"end": {
"line": 10,
"column": 43
}
}
},
"range": [
380,
415
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 43
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "expected",
"range": [
416,
424
],
"loc": {
"start": {
"line": 10,
"column": 44
},
"end": {
"line": 10,
"column": 52
}
}
},
{
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "w",
"range": [
428,
429
],
"loc": {
"start": {
"line": 10,
"column": 56
},
"end": {
"line": 10,
"column": 57
}
}
},
"value": {
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "a",
"raw": "'a'",
"range": [
432,
435
],
"loc": {
"start": {
"line": 10,
"column": 60
},
"end": {
"line": 10,
"column": 63
}
}
},
{
"type": "Literal",
"value": "b",
"raw": "'b'",
"range": [
437,
440
],
"loc": {
"start": {
"line": 10,
"column": 65
},
"end": {
"line": 10,
"column": 68
}
}
}
],
"range": [
431,
441
],
"loc": {
"start": {
"line": 10,
"column": 59
},
"end": {
"line": 10,
"column": 69
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
428,
441
],
"loc": {
"start": {
"line": 10,
"column": 56
},
"end": {
"line": 10,
"column": 69
}
}
}
],
"range": [
426,
443
],
"loc": {
"start": {
"line": 10,
"column": 54
},
"end": {
"line": 10,
"column": 71
}
}
}
],
"range": [
380,
444
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 72
}
}
},
"range": [
380,
445
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 73
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectSubscriptions",
"range": [
454,
473
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 27
}
}
},
"arguments": [
{
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
474,
476
],
"loc": {
"start": {
"line": 11,
"column": 28
},
"end": {
"line": 11,
"column": 30
}
}
},
"property": {
"type": "Identifier",
"name": "subscriptions",
"range": [
477,
490
],
"loc": {
"start": {
"line": 11,
"column": 31
},
"end": {
"line": 11,
"column": 44
}
}
},
"range": [
474,
490
],
"loc": {
"start": {
"line": 11,
"column": 28
},
"end": {
"line": 11,
"column": 44
}
}
}
],
"range": [
454,
491
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 45
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
492,
496
],
"loc": {
"start": {
"line": 11,
"column": 46
},
"end": {
"line": 11,
"column": 50
}
}
},
"range": [
454,
496
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 50
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "e1subs",
"range": [
497,
503
],
"loc": {
"start": {
"line": 11,
"column": 51
},
"end": {
"line": 11,
"column": 57
}
}
}
],
"range": [
454,
504
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 58
}
}
},
"range": [
454,
505
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 59
}
}
}
],
"range": [
259,
511
],
"loc": {
"start": {
"line": 6,
"column": 96
},
"end": {
"line": 12,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
247,
511
],
"loc": {
"start": {
"line": 6,
"column": 84
},
"end": {
"line": 12,
"column": 5
}
}
}
],
"range": [
167,
512
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 12,
"column": 6
}
}
},
"range": [
167,
513
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 12,
"column": 7
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
518,
520
],
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 6
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should be never when source is never",
"raw": "'should be never when source is never'",
"range": [
521,
559
],
"loc": {
"start": {
"line": 13,
"column": 7
},
"end": {
"line": 13,
"column": 45
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
587,
589
],