UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,342 lines (1,341 loc) 813 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 } }, "trailingComments": [ { "type": "Block", "value": "* @test {retry} ", "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.retry", "raw": "'Observable.prototype.retry'", "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": "retry(2)", "raw": "'retry(2)'", "range": [ 203, 213 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 24 } } } ], "range": [ 193, 214 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 25 } } }, "arguments": [ { "type": "Literal", "value": "should handle a basic source that emits next then errors, count=3", "raw": "'should handle a basic source that emits next then errors, count=3'", "range": [ 215, 282 ], "loc": { "start": { "line": 7, "column": 26 }, "end": { "line": 7, "column": 93 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source", "range": [ 310, 316 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 319, 323 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 25 } } }, "arguments": [ { "type": "Literal", "value": "--1-2-3-#", "raw": "'--1-2-3-#'", "range": [ 324, 335 ], "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 37 } } } ], "range": [ 319, 336 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 38 } } }, "range": [ 310, 336 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 38 } } } ], "kind": "var", "range": [ 306, 337 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 39 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "subs", "range": [ 350, 354 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 16 } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "^ ! ", "raw": "'^ ! '", "range": [ 358, 385 ], "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 47 } } }, { "type": "Literal", "value": " ^ ! ", "raw": "' ^ ! '", "range": [ 399, 426 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 39 } } }, { "type": "Literal", "value": " ^ !", "raw": "' ^ !'", "range": [ 440, 467 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 39 } } } ], "range": [ 357, 468 ], "loc": { "start": { "line": 9, "column": 19 }, "end": { "line": 11, "column": 40 } } }, "range": [ 350, 468 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 11, "column": 40 } } } ], "kind": "var", "range": [ 346, 469 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 11, "column": 41 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 482, 490 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 20 } } }, "init": { "type": "Literal", "value": "--1-2-3---1-2-3---1-2-3-#", "raw": "'--1-2-3---1-2-3---1-2-3-#'", "range": [ 493, 520 ], "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 50 } } }, "range": [ 482, 520 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 50 } } } ], "kind": "var", "range": [ 478, 521 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 51 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 534, 540 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 543, 549 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 27 } } }, "property": { "type": "Identifier", "name": "retry", "range": [ 550, 555 ], "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 33 } } }, "range": [ 543, 555 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 33 } } }, "arguments": [ { "type": "Literal", "value": 2, "raw": "2", "range": [ 556, 557 ], "loc": { "start": { "line": 13, "column": 34 }, "end": { "line": 13, "column": 35 } } } ], "range": [ 543, 558 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 36 } } }, "range": [ 534, 558 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 36 } } } ], "kind": "var", "range": [ 530, 559 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 37 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 568, 584 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "result", "range": [ 585, 591 ], "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 31 } } } ], "range": [ 568, 592 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 32 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 593, 597 ], "loc": { "start": { "line": 14, "column": 33 }, "end": { "line": 14, "column": 37 } } }, "range": [ 568, 597 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 37 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 598, 606 ], "loc": { "start": { "line": 14, "column": 38 }, "end": { "line": 14, "column": 46 } } } ], "range": [ 568, 607 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 47 } } }, "range": [ 568, 608 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 48 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectSubscriptions", "range": [ 617, 636 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 27 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 637, 643 ], "loc": { "start": { "line": 15, "column": 28 }, "end": { "line": 15, "column": 34 } } }, "property": { "type": "Identifier", "name": "subscriptions", "range": [ 644, 657 ], "loc": { "start": { "line": 15, "column": 35 }, "end": { "line": 15, "column": 48 } } }, "range": [ 637, 657 ], "loc": { "start": { "line": 15, "column": 28 }, "end": { "line": 15, "column": 48 } } } ], "range": [ 617, 658 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 49 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 659, 663 ], "loc": { "start": { "line": 15, "column": 50 }, "end": { "line": 15, "column": 54 } } }, "range": [ 617, 663 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 54 } } }, "arguments": [ { "type": "Identifier", "name": "subs", "range": [ 664, 668 ], "loc": { "start": { "line": 15, "column": 55 }, "end": { "line": 15, "column": 59 } } } ], "range": [ 617, 669 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 60 } } }, "range": [ 617, 670 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 61 } } } ], "range": [ 296, 676 ], "loc": { "start": { "line": 7, "column": 107 }, "end": { "line": 16, "column": 5 } } }, "generator": false, "expression": false, "range": [ 284, 676 ], "loc": { "start": { "line": 7, "column": 95