UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,392 lines (1,391 loc) 855 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": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Subject", "range": [ 119, 126 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 11 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 129, 131 ], "loc": { "start": { "line": 5, "column": 14 }, "end": { "line": 5, "column": 16 } } }, "property": { "type": "Identifier", "name": "Subject", "range": [ 132, 139 ], "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 24 } } }, "range": [ 129, 139 ], "loc": { "start": { "line": 5, "column": 14 }, "end": { "line": 5, "column": 24 } } }, "range": [ 119, 139 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 24 } } } ], "kind": "var", "range": [ 115, 140 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 25 } }, "trailingComments": [ { "type": "Block", "value": "* @test {do} ", "range": [ 141, 158 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 17 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 159, 167 ], "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.do", "raw": "'Observable.prototype.do'", "range": [ 168, 193 ], "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 34 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 213, 222 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "do(x => console.log(x))", "raw": "'do(x => console.log(x))'", "range": [ 223, 248 ], "loc": { "start": { "line": 8, "column": 14 }, "end": { "line": 8, "column": 39 } } } ], "range": [ 213, 249 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 40 } } }, "arguments": [ { "type": "Literal", "value": "should mirror multiple values and complete", "raw": "'should mirror multiple values and complete'", "range": [ 250, 294 ], "loc": { "start": { "line": 8, "column": 41 }, "end": { "line": 8, "column": 85 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 322, 324 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 327, 331 ], "loc": { "start": { "line": 9, "column": 17 }, "end": { "line": 9, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": "--1--2--3--|", "raw": "'--1--2--3--|'", "range": [ 332, 346 ], "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 9, "column": 36 } } } ], "range": [ 327, 347 ], "loc": { "start": { "line": 9, "column": 17 }, "end": { "line": 9, "column": 37 } } }, "range": [ 322, 347 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 37 } } } ], "kind": "var", "range": [ 318, 348 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1subs", "range": [ 361, 367 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 18 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 370, 384 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 35 } } }, "range": [ 361, 384 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 35 } } } ], "kind": "var", "range": [ 357, 385 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 36 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 398, 406 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 20 } } }, "init": { "type": "Literal", "value": "--1--2--3--|", "raw": "'--1--2--3--|'", "range": [ 409, 423 ], "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 37 } } }, "range": [ 398, 423 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 37 } } } ], "kind": "var", "range": [ 394, 424 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 437, 443 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 446, 448 ], "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 23 } } }, "property": { "type": "Identifier", "name": "do", "range": [ 449, 451 ], "loc": { "start": { "line": 12, "column": 24 }, "end": { "line": 12, "column": 26 } } }, "range": [ 446, 451 ], "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 26 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 464, 494 ], "loc": { "start": { "line": 12, "column": 39 }, "end": { "line": 14, "column": 9 } }, "trailingComments": [ { "type": "Line", "value": "noop", "range": [ 478, 484 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 18 } } } ] }, "generator": false, "expression": false, "range": [ 452, 494 ], "loc": { "start": { "line": 12, "column": 27 }, "end": { "line": 14, "column": 9 } } } ], "range": [ 446, 495 ], "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 14, "column": 10 } } }, "range": [ 437, 495 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 14, "column": 10 } } } ], "kind": "var", "range": [ 433, 496 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 14, "column": 11 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 505, 521 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "result", "range": [ 522, 528 ], "loc": { "start": { "line": 15, "column": 25 }, "end": { "line": 15, "column": 31 } } } ], "range": [ 505, 529 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 32 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 530, 534 ], "loc": { "start": { "line": 15, "column": 33 }, "end": { "line": 15, "column": 37 } } }, "range": [ 505, 534 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 37 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 535, 543 ], "loc": { "start": { "line": 15, "column": 38 }, "end": { "line": 15, "column": 46 } } } ], "range": [ 505, 544 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 47 } } }, "range": [ 505, 545 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 48 } }, "leadingComments": [ { "type": "Line", "value": "noop", "range": [ 478, 484 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 18 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectSubscriptions", "range": [ 554, 573 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 27 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 574, 576 ], "loc": { "start": { "line": 16, "column": 28 }, "end": { "line": 16, "column": 30 } } }, "property": { "type": "Identifier", "name": "subscriptions", "range": [ 577, 590 ], "loc": { "start": { "line": 16, "column": 31 }, "end": { "line": 16, "column": 44 } } }, "range": [ 574, 590 ], "loc": { "start": { "line": 16, "column": 28 }, "end": { "line": 16, "column": 44 } } } ], "range": [ 554, 591 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 45 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 592, 596 ], "loc": { "start": { "line": 16, "column": 46 }, "end": { "line": 16, "column": 50 } } }, "range": [ 554, 596 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 50 } } }, "arguments": [ { "type": "Identifier", "name": "e1subs", "range": [ 597, 603 ], "loc": { "start": { "line": 16, "column": 51 }, "end": {