@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,358 lines (1,357 loc) • 1.3 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 {concat} ",
"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.concat",
"raw": "'Observable.prototype.concat'",
"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": "concat",
"raw": "'concat'",
"range": [
205,
213
],
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 22
}
}
}
],
"range": [
195,
214
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 23
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should concatenate two cold observables",
"raw": "'should concatenate two cold observables'",
"range": [
215,
256
],
"loc": {
"start": {
"line": 7,
"column": 24
},
"end": {
"line": 7,
"column": 65
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
284,
286
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
289,
293
],
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 21
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--a--b-|",
"raw": "'--a--b-|'",
"range": [
294,
304
],
"loc": {
"start": {
"line": 8,
"column": 22
},
"end": {
"line": 8,
"column": 32
}
}
}
],
"range": [
289,
305
],
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 33
}
}
},
"range": [
284,
305
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 33
}
}
}
],
"kind": "var",
"range": [
280,
306
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 34
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e2",
"range": [
319,
321
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
324,
328
],
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 21
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--x---y--|",
"raw": "'--x---y--|'",
"range": [
329,
341
],
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 34
}
}
}
],
"range": [
324,
342
],
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 35
}
}
},
"range": [
319,
342
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 35
}
}
}
],
"kind": "var",
"range": [
315,
343
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 36
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
356,
364
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "--a--b---x---y--|",
"raw": "'--a--b---x---y--|'",
"range": [
367,
386
],
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 42
}
}
},
"range": [
356,
386
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 42
}
}
}
],
"kind": "var",
"range": [
352,
387
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 43
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
396,
412
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 24
}
}
},
"arguments": [
{
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
413,
415
],
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 11,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "concat",
"range": [
416,
422
],
"loc": {
"start": {
"line": 11,
"column": 28
},
"end": {
"line": 11,
"column": 34
}
}
},
"range": [
413,
422
],
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 11,
"column": 34
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "e2",
"range": [
423,
425
],
"loc": {
"start": {
"line": 11,
"column": 35
},
"end": {
"line": 11,
"column": 37
}
}
},
{
"type": "Identifier",
"name": "rxTestScheduler",
"range": [
427,
442
],
"loc": {
"start": {
"line": 11,
"column": 39
},
"end": {
"line": 11,
"column": 54
}
}
}
],
"range": [
413,
443
],
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 11,
"column": 55
}
}
}
],
"range": [
396,
444
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 56
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
445,
449
],
"loc": {
"start": {
"line": 11,
"column": 57
},
"end": {
"line": 11,
"column": 61
}
}
},
"range": [
396,
449
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 61
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "expected",
"range": [
450,
458
],
"loc": {
"start": {
"line": 11,
"column": 62
},
"end": {
"line": 11,
"column": 70
}
}
}
],
"range": [
396,
459
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 71
}
}
},
"range": [
396,
460
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 72
}
}
}
],
"range": [
270,
466
],
"loc": {
"start": {
"line": 7,
"column": 79
},
"end": {
"line": 12,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
258,
466
],
"loc": {
"start": {
"line": 7,
"column": 67
},
"end": {
"line": 12,
"column": 5
}
}
}
],
"range": [
195,
467
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 12,
"column": 6
}
}
},
"range": [
195,
468
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 12,
"column": 7
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
473,
475
],
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 6
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should work properly with scalar observables",
"raw": "'should work properly with scalar observables'",
"range": [
476,
522
],
"loc": {
"start": {
"line": 13,
"column": 7
},
"end": {
"line": 13,
"column": 53
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "done",
"range": [
534,
538
],
"loc": {
"start": {
"line": 13,
"column": 65
},
"end": {
"line": 13,
"column": 69
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "results",
"range": [
554,
561
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 19
}
}
},
"init": {
"type": "ArrayExpression",
"elements": [],
"range": [
564,
566
],
"loc": {
"start": {
"line": 14,
"column": 22
},
"end": {
"line": 14,
"column": 24
}
}
},
"range": [
554,
566
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 24
}
}
}
],
"kind": "var",
"range": [
550,
567
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 25
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "s1",
"range": [
580,
582
],
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Observable",
"range": [
585,
595
],
"loc": {
"start": {
"line": 15,
"column": 17
},
"end": {
"line": 15,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "create",
"range": [
609,
615
],
"loc": {
"start": {
"line": 16,
"column": 13
},
"end": {
"line": 16,
"column": 19
}
}
},
"range": [
585,
615
],
"loc": {
"start": {
"line": 15,
"column": 17
},
"end": {
"line": 16,
"column": 19
}
}
},
"arguments": [
{
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "observer",
"range": [
626,