@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,290 lines (1,289 loc) • 1.01 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 {max} ",
"range": [
115,
133
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 18
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
134,
142
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.max",
"raw": "'Observable.prototype.max'",
"range": [
143,
169
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 35
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
189,
198
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "max",
"raw": "'max'",
"range": [
199,
204
],
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 19
}
}
}
],
"range": [
189,
205
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should find the max of values of an observable",
"raw": "'should find the max of values of an observable'",
"range": [
206,
254
],
"loc": {
"start": {
"line": 7,
"column": 21
},
"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": [
282,
284
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
287,
290
],
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--a--b--c--|",
"raw": "'--a--b--c--|'",
"range": [
291,
305
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 35
}
}
},
{
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "a",
"range": [
309,
310
],
"loc": {
"start": {
"line": 8,
"column": 39
},
"end": {
"line": 8,
"column": 40
}
}
},
"value": {
"type": "Literal",
"value": 42,
"raw": "42",
"range": [
312,
314
],
"loc": {
"start": {
"line": 8,
"column": 42
},
"end": {
"line": 8,
"column": 44
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
309,
314
],
"loc": {
"start": {
"line": 8,
"column": 39
},
"end": {
"line": 8,
"column": 44
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "b",
"range": [
316,
317
],
"loc": {
"start": {
"line": 8,
"column": 46
},
"end": {
"line": 8,
"column": 47
}
}
},
"value": {
"type": "UnaryExpression",
"operator": "-",
"argument": {
"type": "Literal",
"value": 1,
"raw": "1",
"range": [
320,
321
],
"loc": {
"start": {
"line": 8,
"column": 50
},
"end": {
"line": 8,
"column": 51
}
}
},
"prefix": true,
"range": [
319,
321
],
"loc": {
"start": {
"line": 8,
"column": 49
},
"end": {
"line": 8,
"column": 51
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
316,
321
],
"loc": {
"start": {
"line": 8,
"column": 46
},
"end": {
"line": 8,
"column": 51
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "c",
"range": [
323,
324
],
"loc": {
"start": {
"line": 8,
"column": 53
},
"end": {
"line": 8,
"column": 54
}
}
},
"value": {
"type": "Literal",
"value": 3,
"raw": "3",
"range": [
326,
327
],
"loc": {
"start": {
"line": 8,
"column": 56
},
"end": {
"line": 8,
"column": 57
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
323,
327
],
"loc": {
"start": {
"line": 8,
"column": 53
},
"end": {
"line": 8,
"column": 57
}
}
}
],
"range": [
307,
329
],
"loc": {
"start": {
"line": 8,
"column": 37
},
"end": {
"line": 8,
"column": 59
}
}
}
],
"range": [
287,
330
],
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 60
}
}
},
"range": [
282,
330
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 60
}
}
}
],
"kind": "var",
"range": [
278,
331
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 61
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "subs",
"range": [
344,
348
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 16
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
351,
365
],
"loc": {
"start": {
"line": 9,
"column": 19
},
"end": {
"line": 9,
"column": 33
}
}
},
"range": [
344,
365
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 33
}
}
}
],
"kind": "var",
"range": [
340,
366
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 34
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
379,
387
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "-----------(x|)",
"raw": "'-----------(x|)'",
"range": [
390,
407
],
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 40
}
}
},
"range": [
379,
407
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 40
}
}
}
],
"kind": "var",
"range": [
375,
408
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 41
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
417,
433
],
"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": [
434,
436
],
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 11,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "max",
"range": [
437,
440
],
"loc": {
"start": {
"line": 11,
"column": 28
},
"end": {
"line": 11,
"column": 31
}
}
},
"range": [
434,
440
],
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 11,
"column": 31
}
}
},
"arguments": [],
"range": [
434,
442
],
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 11,
"column": 33
}
}
}
],
"range": [
417,
443
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 34
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
444,
448
],
"loc": {
"start": {
"line": 11,
"column": 35
},
"end": {
"line": 11,
"column": 39
}
}
},
"range": [
417,
448
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 39
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "expected",
"range": [
449,
457
],
"loc": {
"start": {
"line": 11,
"column": 40
},
"end": {
"line": 11,
"column": 48
}
}
},
{
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "x",
"range": [
461,
462
],
"loc": {
"start": {
"line": 11,
"column": 52
},
"end": {
"line": 11,
"column": 53
}
}
},
"value": {
"type": "Literal",
"value": 42,
"raw": "42",
"range": [
464,
466
],
"loc": {
"start": {
"line": 11,
"column": 55
},
"end": {
"line": 11,
"column": 57
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
461,
466
],
"loc": {
"start": {
"line": 11,
"column": 52
},
"end": {
"line": 11,
"column": 57
}
}
}
],
"range": [
459,
468
],
"loc": {
"start": {
"line": 11,
"column": 50
},
"end": {
"line": 11,
"column": 59
}
}
}
],
"range": [
417,
469
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 60
}
}
},
"range": [
417,
470
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 61
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectSubscriptions",
"range": [
479,
498
],