UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,193 lines (1,192 loc) 316 kB
{ "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": "sinon", "range": [ 48, 53 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 9 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 56, 63 ], "loc": { "start": { "line": 3, "column": 12 }, "end": { "line": 3, "column": 19 } } }, "arguments": [ { "type": "Literal", "value": "sinon", "raw": "'sinon'", "range": [ 64, 71 ], "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 27 } } } ], "range": [ 56, 72 ], "loc": { "start": { "line": 3, "column": 12 }, "end": { "line": 3, "column": 28 } } }, "range": [ 48, 72 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 28 } } } ], "kind": "var", "range": [ 44, 73 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 29 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Rx", "range": [ 78, 80 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 6 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 83, 90 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 16 } } }, "arguments": [ { "type": "Literal", "value": "../dist/cjs/Rx", "raw": "'../dist/cjs/Rx'", "range": [ 91, 107 ], "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 33 } } } ], "range": [ 83, 108 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 34 } } }, "range": [ 78, 108 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 34 } } } ], "kind": "var", "range": [ 74, 109 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 35 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Subscriber", "range": [ 114, 124 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 14 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 127, 129 ], "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 19 } } }, "property": { "type": "Identifier", "name": "Subscriber", "range": [ 130, 140 ], "loc": { "start": { "line": 5, "column": 20 }, "end": { "line": 5, "column": 30 } } }, "range": [ 127, 140 ], "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 30 } } }, "range": [ 114, 140 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 30 } } } ], "kind": "var", "range": [ 110, 141 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 31 } }, "trailingComments": [ { "type": "Block", "value": "* @test {Subscriber} ", "range": [ 142, 167 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 25 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 168, 176 ], "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Subscriber", "raw": "'Subscriber'", "range": [ 177, 189 ], "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 21 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 209, 217 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 12 } } }, "arguments": [ { "type": "Literal", "value": "when created through create()", "raw": "'when created through create()'", "range": [ 218, 249 ], "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 44 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 273, 275 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 10 } } }, "arguments": [ { "type": "Literal", "value": "should not call error() if next() handler throws an error", "raw": "'should not call error() if next() handler throws an error'", "range": [ 276, 335 ], "loc": { "start": { "line": 9, "column": 11 }, "end": { "line": 9, "column": 70 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "errorSpy", "range": [ 367, 375 ], "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 24 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "sinon", "range": [ 378, 383 ], "loc": { "start": { "line": 10, "column": 27 }, "end": { "line": 10, "column": 32 } } }, "property": { "type": "Identifier", "name": "spy", "range": [ 384, 387 ], "loc": { "start": { "line": 10, "column": 33 }, "end": { "line": 10, "column": 36 } } }, "range": [ 378, 387 ], "loc": { "start": { "line": 10, "column": 27 }, "end": { "line": 10, "column": 36 } } }, "arguments": [], "range": [ 378, 389 ], "loc": { "start": { "line": 10, "column": 27 }, "end": { "line": 10, "column": 38 } } }, "range": [ 367, 389 ], "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 38 } } } ], "kind": "var", "range": [ 363, 390 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 39 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "completeSpy", "range": [ 407, 418 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 27 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "sinon", "range": [ 421, 426 ], "loc": { "start": { "line": 11, "column": 30 }, "end": { "line": 11, "column": 35 } } }, "property": { "type": "Identifier", "name": "spy", "range": [ 427, 430 ], "loc": { "start": { "line": 11, "column": 36 }, "end": { "line": 11, "column": 39 } } }, "range": [ 421, 430 ], "loc": { "start": { "line": 11, "column": 30 }, "end": { "line": 11, "column": 39 } } }, "arguments": [], "range": [ 421, 432 ], "loc": { "start": { "line": 11, "column": 30 }, "end": { "line": 11, "column": 41 } } }, "range": [ 407, 432 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 41 } } } ], "kind": "var", "range": [ 403, 433 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 42 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "subscriber", "range": [ 450, 460 ], "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 26 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Subscriber", "range": [ 463, 473 ], "loc": { "start": { "line": 12, "column": 29 }, "end": { "line": 12, "column": 39 } } }, "property": { "type": "Identifier", "name": "create", "range": [ 474, 480 ], "loc": { "start": { "line": 12, "column": 40 }, "end": { "line": 12, "column": 46 } } }, "range": [ 463, 480 ], "loc": { "start": { "line": 12, "column": 29 }, "end": { "line": 12, "column": 46 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "value", "range": [ 491, 496 ], "loc": { "start": { "line": 12, "column": 57 }, "end": { "line": 12, "column": 62 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "value", "range": [ 520, 525 ], "loc": { "start": { "line": 13, "column": 20 }, "end": { "line": 13, "column": 25 } } }, "right": { "type": "Literal", "value": 2, "raw": "2", "range": [ 530, 531 ], "loc": { "start": { "line": 13, "column": 30 }, "end": { "line": 13, "column": 31 } } }, "range": [ 520, 531 ], "loc": { "start": { "line": 13, "column": 20 }, "end": { "line": 13, "column": 31 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ThrowStatement", "argument": { "type": "Literal", "value": "error!", "raw": "'error!'", "range": [ 561, 569 ], "loc": { "start": { "line": 14, "column": 26 }, "end": { "line": 14, "column": 34 } } }, "range": [ 555, 570 ], "loc": { "start": { "line": 14, "column": 20 }, "end": { "line": 14, "column": 35 } } } ], "range": [ 533, 588 ], "loc": { "start": { "line": 13, "column": 33 }, "end": { "line": 15, "column": 17 } } }, "alternate": null, "range": [ 516, 588 ], "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 15, "column": 17 } } } ], "range": [ 498, 602 ], "loc": { "start": { "line": 12, "column": 64 }, "end": { "line": 16, "column": 13 } } }, "generator": false, "expression": false, "range": [ 481, 602 ], "loc": { "start": { "line": 12, "column": 47 }, "end": { "line": 16, "column": 13 } } }, { "type": "Identifier", "name": "errorSpy", "range": [ 604, 612 ], "loc": { "start": { "line": 16, "column": 15 }, "end": { "line": 16, "column": 23 } } }, { "type": "Identifier", "name": "completeSpy", "range": [ 614,