UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,303 lines (1,302 loc) 401 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": "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 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 115, 123 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.if", "raw": "'Observable.if'", "range": [ 124, 139 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 24 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 159, 161 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should subscribe to thenSource when the conditional returns true", "raw": "'should subscribe to thenSource when the conditional returns true'", "range": [ 162, 228 ], "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 73 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 256, 258 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Observable", "range": [ 261, 271 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 27 } } }, "property": { "type": "Identifier", "name": "if", "range": [ 272, 274 ], "loc": { "start": { "line": 7, "column": 28 }, "end": { "line": 7, "column": 30 } } }, "range": [ 261, 274 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 30 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "Literal", "value": true, "raw": "true", "range": [ 296, 300 ], "loc": { "start": { "line": 7, "column": 52 }, "end": { "line": 7, "column": 56 } } }, "range": [ 289, 301 ], "loc": { "start": { "line": 7, "column": 45 }, "end": { "line": 7, "column": 57 } } } ], "range": [ 287, 303 ], "loc": { "start": { "line": 7, "column": 43 }, "end": { "line": 7, "column": 59 } } }, "generator": false, "expression": false, "range": [ 275, 303 ], "loc": { "start": { "line": 7, "column": 31 }, "end": { "line": 7, "column": 59 } } }, { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Observable", "range": [ 305, 315 ], "loc": { "start": { "line": 7, "column": 61 }, "end": { "line": 7, "column": 71 } } }, "property": { "type": "Identifier", "name": "of", "range": [ 316, 318 ], "loc": { "start": { "line": 7, "column": 72 }, "end": { "line": 7, "column": 74 } } }, "range": [ 305, 318 ], "loc": { "start": { "line": 7, "column": 61 }, "end": { "line": 7, "column": 74 } } }, "arguments": [ { "type": "Literal", "value": "a", "raw": "'a'", "range": [ 319, 322 ], "loc": { "start": { "line": 7, "column": 75 }, "end": { "line": 7, "column": 78 } } } ], "range": [ 305, 323 ], "loc": { "start": { "line": 7, "column": 61 }, "end": { "line": 7, "column": 79 } } } ], "range": [ 261, 324 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 80 } } }, "range": [ 256, 324 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 80 } } } ], "kind": "var", "range": [ 252, 325 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 81 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 338, 346 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 20 } } }, "init": { "type": "Literal", "value": "(a|)", "raw": "'(a|)'", "range": [ 349, 355 ], "loc": { "start": { "line": 8, "column": 23 }, "end": { "line": 8, "column": 29 } } }, "range": [ 338, 355 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 29 } } } ], "kind": "var", "range": [ 334, 356 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 30 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 365, 381 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "e1", "range": [ 382, 384 ], "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 27 } } } ], "range": [ 365, 385 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 28 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 386, 390 ], "loc": { "start": { "line": 9, "column": 29 }, "end": { "line": 9, "column": 33 } } }, "range": [ 365, 390 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 33 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 391, 399 ], "loc": { "start": { "line": 9, "column": 34 }, "end": { "line": 9, "column": 42 } } } ], "range": [ 365, 400 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 43 } } }, "range": [ 365, 401 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 44 } } } ], "range": [ 242, 407 ], "loc": { "start": { "line": 6, "column": 87 }, "end": { "line": 10, "column": 5 } } }, "generator": false, "expression": false, "range": [ 230, 407 ], "loc": { "start": { "line": 6, "column": 75 }, "end": { "line": 10, "column": 5 } } } ], "range": [ 159, 408 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 10, "column": 6 } }, "_esdocTestId": 396, "_esdocTestName": "it396" }, "range": [ 159, 409 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 10, "column": 7 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 414, 416 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should subscribe to elseSource when the conditional returns false", "raw": "'should subscribe to elseSource when the conditional returns false'", "range": [ 417, 484 ], "loc": { "start": { "line": 11, "column": 7 }, "end": { "line": 11, "column": 74 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 512, 514 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Observable", "range": [ 517, 527 ], "loc": { "start": { "line": 12, "column": 17 }, "end": { "line": 12, "column": 27 } } }, "property": { "type": "Identifier", "name": "if", "range": [ 528, 530 ], "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 30 } } }, "range": [ 517, 530 ], "loc": { "start": { "line": 12, "column": 17 }, "end": { "line": 12, "column": 30 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "Literal", "value": false, "raw": "false", "range": [ 552, 557 ], "loc": { "start": { "line": 12, "column": 52 }, "end": { "line": 12, "column": 57 } } }, "range": [ 545, 558 ], "loc": { "start": { "line": 12, "column": 45 }, "end": { "line": 12, "column": 58 } } } ], "range": [ 543, 560 ], "loc": { "start": { "line": 12, "column": 43 }, "end": { "line": 12, "column": 60 } } }, "generator": false, "expression": false, "range": [ 531, 560 ], "loc": { "start": { "line": 12, "column": 31 }, "end": { "line": 12, "column": 60 } } }, { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Observable", "range": [ 562, 572 ], "loc": { "start": { "line": 12, "column": 62 }, "end": { "line": 12, "column": 72 } } }, "property": { "type": "Identifier", "name": "of", "range": [ 573, 575 ], "loc": { "start": { "line": 12, "column": 73 }, "end": { "line": 12, "column": 75 } } }, "range": [ 562, 575 ], "loc": { "start": { "line": 12,