UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,327 lines (1,326 loc) 1.35 MB
{ "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 {audit} ", "range": [ 115, 135 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 20 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 136, 144 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.audit", "raw": "'Observable.prototype.audit'", "range": [ 145, 173 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 37 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 193, 202 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "audit", "raw": "'audit'", "range": [ 203, 210 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 21 } } } ], "range": [ 193, 211 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 22 } } }, "arguments": [ { "type": "Literal", "value": "should emit the last value in each time window", "raw": "'should emit the last value in each time window'", "range": [ 212, 260 ], "loc": { "start": { "line": 7, "column": 23 }, "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": [ 288, 290 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 293, 296 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "-a-xy-----b--x--cxxx-|", "raw": "'-a-xy-----b--x--cxxx-|'", "range": [ 297, 321 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 45 } } } ], "range": [ 293, 322 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 46 } } }, "range": [ 288, 322 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 46 } } } ], "kind": "var", "range": [ 284, 323 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 47 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1subs", "range": [ 336, 342 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 18 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 345, 369 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 45 } } }, "range": [ 336, 369 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 45 } } } ], "kind": "var", "range": [ 332, 370 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 46 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e2", "range": [ 383, 385 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 388, 392 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": "----| ", "raw": "'----| '", "range": [ 393, 416 ], "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 45 } } } ], "range": [ 388, 417 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 46 } } }, "range": [ 383, 417 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 46 } } } ], "kind": "var", "range": [ 379, 418 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 47 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e2subs", "range": [ 431, 437 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 18 } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": " ^ ! ", "raw": "' ^ ! '", "range": [ 441, 465 ], "loc": { "start": { "line": 11, "column": 22 }, "end": { "line": 11, "column": 46 } } }, { "type": "Literal", "value": " ^ ! ", "raw": "' ^ ! '", "range": [ 479, 503 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 36 } } }, { "type": "Literal", "value": " ^ ! ", "raw": "' ^ ! '", "range": [ 517, 541 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 36 } } } ], "range": [ 440, 542 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 13, "column": 37 } } }, "range": [ 431, 542 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 13, "column": 37 } } } ], "kind": "var", "range": [ 427, 543 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 13, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 556, 564 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 20 } } }, "init": { "type": "Literal", "value": "-----y--------x-----x|", "raw": "'-----y--------x-----x|'", "range": [ 567, 591 ], "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 47 } } }, "range": [ 556, 591 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 47 } } } ], "kind": "var", "range": [ 552, 592 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 48 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 605, 611 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 614, 616 ], "loc": { "start": { "line": 15, "column": 21 }, "end": { "line": 15, "column": 23 } } }, "property": { "type": "Identifier", "name": "audit", "range": [ 617, 622 ], "loc": { "start": { "line": 15, "column": 24 }, "end": { "line": 15, "column": 29 } } }, "range": [ 614, 622 ], "loc": { "start": { "line": 15, "column": 21 }, "end": { "line": 15, "column": 29 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "e2", "range": [ 644, 646 ], "loc": { "start": { "line": 15, "column": 51 }, "end": { "line": 15, "column": 53 } } }, "range": [ 637, 647 ], "loc": { "start": { "line": 15, "column": 44 }, "end": { "line": 15, "column": 54 } } } ], "range": [ 635, 649 ], "loc": { "start": { "line": 15, "column": 42 }, "end": { "line": 15, "column": 56 } } }, "generator": false, "expression": false, "range": [ 623, 649 ], "loc": { "start": { "line": 15, "column": 30 }, "end": { "line": 15, "column": 56 } } } ], "range": [ 614, 650 ], "loc": { "start": { "line": 15, "column": 21 }, "end": { "line": 15, "column": 57 } } }, "range": [ 605, 650 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 57 } } } ], "kind": "var", "range": [ 601, 651 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 58 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 660, 676 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "result", "range": [ 677, 683 ], "loc": { "start": { "line": 16, "column": 25 }, "end": { "line": 16, "column": 31 } } } ], "range": [ 660, 684 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 32 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 685, 689 ], "loc": { "start": { "line": 16, "column": 33 }, "end": { "line": 16, "column": 37 } } }, "range": [ 660, 689 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 37 } } }, "arguments": [