@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,358 lines • 1.1 MB
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": "Rx",
"range": [
48,
50
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 6
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
53,
60
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 16
}
}
},
"arguments": [
{
"type": "Literal",
"value": "../../dist/cjs/Rx",
"raw": "'../../dist/cjs/Rx'",
"range": [
61,
80
],
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 36
}
}
}
],
"range": [
53,
81
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 37
}
}
},
"range": [
48,
81
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 37
}
}
}
],
"kind": "var",
"range": [
44,
82
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 38
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Observable",
"range": [
87,
97
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 14
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
100,
102
],
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "Observable",
"range": [
103,
113
],
"loc": {
"start": {
"line": 4,
"column": 20
},
"end": {
"line": 4,
"column": 30
}
}
},
"range": [
100,
113
],
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 30
}
}
},
"range": [
87,
113
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 30
}
}
}
],
"kind": "var",
"range": [
83,
114
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 31
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {repeat} ",
"range": [
115,
136
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 21
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
137,
145
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.repeat",
"raw": "'Observable.prototype.repeat'",
"range": [
146,
175
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 38
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
195,
204
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "repeat(3)",
"raw": "'repeat(3)'",
"range": [
205,
216
],
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 25
}
}
}
],
"range": [
195,
217
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 26
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should resubscribe count number of times",
"raw": "'should resubscribe count number of times'",
"range": [
218,
260
],
"loc": {
"start": {
"line": 7,
"column": 27
},
"end": {
"line": 7,
"column": 69
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
288,
290
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
293,
297
],
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 21
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--a--b--| ",
"raw": "'--a--b--| '",
"range": [
298,
325
],
"loc": {
"start": {
"line": 8,
"column": 22
},
"end": {
"line": 8,
"column": 49
}
}
}
],
"range": [
293,
326
],
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 50
}
}
},
"range": [
288,
326
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 50
}
}
}
],
"kind": "var",
"range": [
284,
327
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 51
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "subs",
"range": [
340,
344
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 16
}
}
},
"init": {
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "^ ! ",
"raw": "'^ ! '",
"range": [
348,
375
],
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 47
}
}
},
{
"type": "Literal",
"value": " ^ ! ",
"raw": "' ^ ! '",
"range": [
389,
416
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 39
}
}
},
{
"type": "Literal",
"value": " ^ !",
"raw": "' ^ !'",
"range": [
430,
457
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 39
}
}
}
],
"range": [
347,
458
],
"loc": {
"start": {
"line": 9,
"column": 19
},
"end": {
"line": 11,
"column": 40
}
}
},
"range": [
340,
458
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 11,
"column": 40
}
}
}
],
"kind": "var",
"range": [
336,
459
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 11,
"column": 41
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
472,
480
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "--a--b----a--b----a--b--|",
"raw": "'--a--b----a--b----a--b--|'",
"range": [
483,
510
],
"loc": {
"start": {
"line": 12,
"column": 23
},
"end": {
"line": 12,
"column": 50
}
}
},
"range": [
472,
510
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 50
}
}
}
],
"kind": "var",
"range": [
468,
511
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 51
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
520,
536
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 24
}
}
},
"arguments": [
{
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
537,
539
],
"loc": {
"start": {
"line": 13,
"column": 25
},
"end": {
"line": 13,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "repeat",
"range": [
540,
546
],
"loc": {
"start": {
"line": 13,
"column": 28
},
"end": {
"line": 13,
"column": 34
}
}
},
"range": [
537,
546
],
"loc": {
"start": {
"line": 13,
"column": 25
},
"end": {
"line": 13,
"column": 34
}
}
},
"arguments": [
{
"type": "Literal",
"value": 3,
"raw": "3",
"range": [
547,
548
],
"loc": {
"start": {
"line": 13,
"column": 35
},
"end": {
"line": 13,
"column": 36
}
}
}
],
"range": [
537,
549
],
"loc": {
"start": {
"line": 13,
"column": 25
},
"end": {
"line": 13,
"column": 37
}
}
}
],
"range": [
520,
550
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 38
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
551,
555
],
"loc": {
"start": {
"line": 13,
"column": 39
},
"end": {
"line": 13,
"column": 43
}
}
},
"range": [
520,
555
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 43
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "expected",
"range": [
556,
564
],
"loc": {
"start": {
"line": 13,
"column": 44
},
"end": {
"line": 13,
"column": 52
}
}
}
],
"range": [
520,
565
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 53
}
}
},
"range": [
520,
566
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 54
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectSubscriptions",
"range": [
575,
594
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 27
}
}
},
"arguments": [
{
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
595,
597
],
"loc": {
"start": {
"line": 14,
"column": 28
},
"end": {
"line": 14,
"column": 30
}
}
},
"property": {
"type": "Identifier",
"name": "subscriptions",
"range": [
598,
611
],
"loc": {
"start": {
"line": 14,
"column": 31
},
"end": {
"line": 14,
"column": 44
}
}
},
"range": [
595,
611
],
"loc": {
"start": {
"line": 14,
"column": 28
},
"end": {
"line": 14,
"column": 44
}
}
}
],
"range": [
575,
612
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 45
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
613,
617
],
"loc": {
"start": {
"line": 14,
"column": 46
},
"end": {
"line": 14,
"column": 50
}
}
},
"range": [
575,
617
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 50
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "subs",
"range": [
618,
622
],
"loc": {
"start": {
"line": 14,
"column": 51
},
"end": {
"line": 14,
"column": 55
}
}
}
],
"range": [
575,
623
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 56
}
}
},
"range": [
575,
624
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 57
}
}
}
],
"range": [
274,
630
],
"loc": {
"start": {
"line": 7,
"column": 83
},
"end": {
"line": 15,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
262,
630
],
"loc": {
"start": {
"line": 7,
"column": 71
},
"end": {
"line": 15,
"column": 5
}
}
}
],
"range": [
195,
631
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 15,
"column": 6
}
}
},
"range": [
195,
632
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 15,
"column": 7
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
637,
639
],
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 6
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should resubscribe multiple times",
"raw": "'should resubscribe multiple times'",
"range": [
640,
675
],
"loc": {
"start": {
"line": 16,
"column": 7
},
"end": {
"line": 16,
"column": 42
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"decl