@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,365 lines (1,364 loc) • 1.67 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 {debounce} ",
"range": [
115,
138
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 23
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
139,
147
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.debounce",
"raw": "'Observable.prototype.debounce'",
"range": [
148,
179
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 40
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "getTimerSelector",
"range": [
208,
224
],
"loc": {
"start": {
"line": 7,
"column": 13
},
"end": {
"line": 7,
"column": 29
}
}
},
"params": [
{
"type": "Identifier",
"name": "x",
"range": [
225,
226
],
"loc": {
"start": {
"line": 7,
"column": 30
},
"end": {
"line": 7,
"column": 31
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Observable",
"range": [
266,
276
],
"loc": {
"start": {
"line": 8,
"column": 36
},
"end": {
"line": 8,
"column": 46
}
}
},
"property": {
"type": "Identifier",
"name": "timer",
"range": [
277,
282
],
"loc": {
"start": {
"line": 8,
"column": 47
},
"end": {
"line": 8,
"column": 52
}
}
},
"range": [
266,
282
],
"loc": {
"start": {
"line": 8,
"column": 36
},
"end": {
"line": 8,
"column": 52
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "x",
"range": [
283,
284
],
"loc": {
"start": {
"line": 8,
"column": 53
},
"end": {
"line": 8,
"column": 54
}
}
},
{
"type": "Identifier",
"name": "rxTestScheduler",
"range": [
286,
301
],
"loc": {
"start": {
"line": 8,
"column": 56
},
"end": {
"line": 8,
"column": 71
}
}
}
],
"range": [
266,
302
],
"loc": {
"start": {
"line": 8,
"column": 36
},
"end": {
"line": 8,
"column": 72
}
}
},
"range": [
259,
303
],
"loc": {
"start": {
"line": 8,
"column": 29
},
"end": {
"line": 8,
"column": 73
}
}
}
],
"range": [
257,
305
],
"loc": {
"start": {
"line": 8,
"column": 27
},
"end": {
"line": 8,
"column": 75
}
}
},
"generator": false,
"expression": false,
"range": [
245,
305
],
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 8,
"column": 75
}
}
},
"range": [
238,
306
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 76
}
}
}
],
"range": [
228,
312
],
"loc": {
"start": {
"line": 7,
"column": 33
},
"end": {
"line": 9,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
199,
312
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 9,
"column": 5
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
317,
326
],
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "debounce",
"raw": "'debounce'",
"range": [
327,
337
],
"loc": {
"start": {
"line": 10,
"column": 14
},
"end": {
"line": 10,
"column": 24
}
}
}
],
"range": [
317,
338
],
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 25
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should debounce values by a specified cold Observable",
"raw": "'should debounce values by a specified cold Observable'",
"range": [
339,
394
],
"loc": {
"start": {
"line": 10,
"column": 26
},
"end": {
"line": 10,
"column": 81
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
422,
424
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
427,
430
],
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "-a--bc--d---|",
"raw": "'-a--bc--d---|'",
"range": [
431,
446
],
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 36
}
}
}
],
"range": [
427,
447
],
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 37
}
}
},
"range": [
422,
447
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 37
}
}
}
],
"kind": "var",
"range": [
418,
448
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 38
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e2",
"range": [
461,
463
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
466,
470
],
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 21
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--| ",
"raw": "'--| '",
"range": [
471,
486
],
"loc": {
"start": {
"line": 12,
"column": 22
},
"end": {
"line": 12,
"column": 37
}
}
}
],
"range": [
466,
487
],
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 38
}
}
},
"range": [
461,
487
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 38
}
}
}
],
"kind": "var",
"range": [
457,
488
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 39
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
501,
509
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "---a---c--d-|",
"raw": "'---a---c--d-|'",
"range": [
512,
527
],
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 13,
"column": 38
}
}
},
"range": [
501,
527
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 38
}
}
}
],
"kind": "var",
"range": [
497,
528
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 39
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "result",
"range": [
541,
547
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 18
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
550,
552
],
"loc": {
"start": {
"line": 14,
"column": 21
},
"end": {
"line": 14,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"name": "debounce",
"range": [
553,
561
],
"loc": {
"start": {
"line": 14,
"column": 24
},
"end": {
"line": 14,
"column": 32
}
}
},
"range": [
550,
561
],
"loc": {
"start": {
"line": 14,
"column": 21
},
"end": {
"line": 14,
"column": 32
}
}
},
"arguments": [
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "Identifier",
"name": "e2",
"range": [
583,
585
],
"loc": {
"start": {
"line": 14,
"column": 54
},
"end": {
"line": 14,
"column": 56
}
}
},
"range": [
576,
586
],
"loc": {
"start": {
"line": 14,
"column": 47
},
"end": {
"line": 14,
"column": 57
}
}
}
],
"range": [
574,
588
],
"loc": {
"start": {
"line": 14,
"column": 45
},
"end": {
"line": 14,
"column": 59
}
}
},
"generator": false,
"expression": false,
"range": [
562,
588
],
"loc": {
"start": {
"line": 14,
"column": 33
},
"end": {
"line": 14,
"column": 59
}
}
}
],
"range": [
550,
589
],
"loc": {
"start": {
"line": 14,
"column": 21
},
"end": {
"line": 14,
"column": 60
}
}
},
"range": [
541,
589
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 60
}
}
}
],
"kind": "var",
"range": [
537,
590
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 61
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
599,
615
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 24
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "result",
"range": [
616,
622
],
"loc": {
"start": {
"line": 15,
"column": 25
},
"end": {
"line": 15,
"column": 31
}
}
}
],
"range": [
599,
623
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 32
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
624,
628
],
"loc": {
"start": {
"line": 15,
"column": 33
},
"end": {
"line": 15,
"column": 37
}
}
},