@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,292 lines (1,291 loc) • 1.49 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 {bufferWhen} ",
"range": [
115,
140
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 25
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
141,
149
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.bufferWhen",
"raw": "'Observable.prototype.bufferWhen'",
"range": [
150,
183
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 42
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
203,
212
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "bufferWhen",
"raw": "'bufferWhen'",
"range": [
213,
225
],
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 26
}
}
}
],
"range": [
203,
226
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 27
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should emit buffers that close and reopen",
"raw": "'should emit buffers that close and reopen'",
"range": [
227,
270
],
"loc": {
"start": {
"line": 7,
"column": 28
},
"end": {
"line": 7,
"column": 71
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
298,
300
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
303,
306
],
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--a--^---b---c---d---e---f---g---------|",
"raw": "'--a--^---b---c---d---e---f---g---------|'",
"range": [
307,
349
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 63
}
}
}
],
"range": [
303,
350
],
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 64
}
}
},
"range": [
298,
350
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 64
}
}
}
],
"kind": "var",
"range": [
294,
351
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 65
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e2",
"range": [
364,
366
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
369,
373
],
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 21
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--------------(s|)",
"raw": "'--------------(s|)'",
"range": [
374,
394
],
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 42
}
}
}
],
"range": [
369,
395
],
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 43
}
}
},
"range": [
364,
395
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 43
}
}
}
],
"kind": "var",
"range": [
360,
396
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 44
}
},
"trailingComments": [
{
"type": "Line",
"value": " --------------(s|)",
"range": [
405,
456
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 59
}
}
}
]
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
469,
477
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "--------------x-------------y-----(z|)",
"raw": "'--------------x-------------y-----(z|)'",
"range": [
480,
520
],
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 63
}
}
},
"range": [
469,
520
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 63
}
}
}
],
"kind": "var",
"range": [
465,
521
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 64
}
},
"leadingComments": [
{
"type": "Line",
"value": " --------------(s|)",
"range": [
405,
456
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 59
}
}
}
]
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "values",
"range": [
534,
540
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 18
}
}
},
"init": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "x",
"range": [
557,
558
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 13
}
}
},
"value": {
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "b",
"raw": "'b'",
"range": [
561,
564
],
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 19
}
}
},
{
"type": "Literal",
"value": "c",
"raw": "'c'",
"range": [
566,
569
],
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 24
}
}
},
{
"type": "Literal",
"value": "d",
"raw": "'d'",
"range": [
571,
574
],
"loc": {
"start": {
"line": 13,
"column": 26
},
"end": {
"line": 13,
"column": 29
}
}
}
],
"range": [
560,
575
],
"loc": {
"start": {
"line": 13,
"column": 15
},
"end": {
"line": 13,
"column": 30
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
557,
575
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 30
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "y",
"range": [
589,
590
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 13
}
}
},
"value": {
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "e",
"raw": "'e'",
"range": [
593,
596
],
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 19
}
}
},
{
"type": "Literal",
"value": "f",
"raw": "'f'",
"range": [
598,
601
],
"loc": {
"start": {
"line": 14,
"column": 21
},
"end": {
"line": 14,
"column": 24
}
}
},
{
"type": "Literal",
"value": "g",
"raw": "'g'",
"range": [
603,
606
],
"loc": {
"start": {
"line": 14,
"column": 26
},
"end": {
"line": 14,
"column": 29
}
}
}
],
"range": [
592,
607
],
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 30
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
589,
607
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 30
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "z",
"range": [
621,
622
],
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 13
}
}
},
"value": {
"type": "ArrayExpression",
"elements": [],
"range": [
624,
626
],
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 17
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
621,
626
],
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 17
}
}
}
],
"range": [
543,
636
],
"loc": {
"start": {
"line": 12,
"column": 21
},
"end": {
"line": 16,
"column": 9
}
}
},
"range": [
534,
636
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 16,
"column": 9
}
}
}
],
"kind": "var",
"range": [
530,
637
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 16,
"column": 10
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
646,
662
],
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 24
}
}
},
"arguments": [
{
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
663,
665
],
"loc": {
"start": {
"line": 17,
"column": 25
},
"end": {
"line": 17,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "bufferWhen",
"range": [
666,
676
],
"loc": {
"start": {
"line": 17,
"column": 28
},
"end": {
"line": 17,
"column": 38
}
}