UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,309 lines (1,308 loc) 590 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": "Rx", "range": [ 18, 20 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 6 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 23, 30 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 16 } } }, "arguments": [ { "type": "Literal", "value": "../../dist/cjs/Rx", "raw": "'../../dist/cjs/Rx'", "range": [ 31, 50 ], "loc": { "start": { "line": 2, "column": 17 }, "end": { "line": 2, "column": 36 } } } ], "range": [ 23, 51 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 37 } } }, "range": [ 18, 51 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 37 } } } ], "kind": "var", "range": [ 14, 52 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Observable", "range": [ 57, 67 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 14 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 70, 72 ], "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 19 } } }, "property": { "type": "Identifier", "name": "Observable", "range": [ 73, 83 ], "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 30 } } }, "range": [ 70, 83 ], "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 30 } } }, "range": [ 57, 83 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 30 } } } ], "kind": "var", "range": [ 53, 84 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 31 } }, "trailingComments": [ { "type": "Block", "value": "* @test {timeout} ", "range": [ 85, 107 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 22 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 108, 116 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.timeout", "raw": "'Observable.prototype.timeout'", "range": [ 117, 147 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 39 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "defaultTimeoutError", "range": [ 171, 190 ], "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 27 } } }, "init": { "type": "NewExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 197, 199 ], "loc": { "start": { "line": 6, "column": 34 }, "end": { "line": 6, "column": 36 } } }, "property": { "type": "Identifier", "name": "TimeoutError", "range": [ 200, 212 ], "loc": { "start": { "line": 6, "column": 37 }, "end": { "line": 6, "column": 49 } } }, "range": [ 197, 212 ], "loc": { "start": { "line": 6, "column": 34 }, "end": { "line": 6, "column": 49 } } }, "arguments": [], "range": [ 193, 214 ], "loc": { "start": { "line": 6, "column": 30 }, "end": { "line": 6, "column": 51 } } }, "range": [ 171, 214 ], "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 51 } } } ], "kind": "var", "range": [ 167, 215 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 52 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 220, 229 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "timeout(50)", "raw": "'timeout(50)'", "range": [ 230, 243 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 27 } } } ], "range": [ 220, 244 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 28 } } }, "arguments": [ { "type": "Literal", "value": "should timeout after a specified timeout period", "raw": "'should timeout after a specified timeout period'", "range": [ 245, 294 ], "loc": { "start": { "line": 7, "column": 29 }, "end": { "line": 7, "column": 78 } } }, { "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": 8, "column": 12 }, "end": { "line": 8, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 327, 331 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": "-------a--b--|", "raw": "'-------a--b--|'", "range": [ 332, 348 ], "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 38 } } } ], "range": [ 327, 349 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 39 } } }, "range": [ 322, 349 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 39 } } } ], "kind": "var", "range": [ 318, 350 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 40 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1subs", "range": [ 363, 369 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 18 } } }, "init": { "type": "Literal", "value": "^ ! ", "raw": "'^ ! '", "range": [ 372, 388 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 37 } } }, "range": [ 363, 388 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 37 } } } ], "kind": "var", "range": [ 359, 389 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 402, 410 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 20 } } }, "init": { "type": "Literal", "value": "-----# ", "raw": "'-----# '", "range": [ 413, 429 ], "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 39 } } }, "range": [ 402, 429 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 39 } } } ], "kind": "var", "range": [ 398, 430 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 40 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 443, 449 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 452, 454 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 23 } } }, "property": { "type": "Identifier", "name": "timeout", "range": [ 455, 462 ], "loc": { "start": { "line": 11, "column": 24 }, "end": { "line": 11, "column": 31 } } }, "range": [ 452, 462 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 31 } } }, "arguments": [ { "type": "Literal", "value": 50, "raw": "50", "range": [ 463, 465 ], "loc": { "start": { "line": 11, "column": 32 }, "end": { "line": 11, "column": 34 } } }, { "type": "Literal", "value": null, "raw": "null", "range": [ 467, 471 ], "loc": { "start": { "line": 11, "column": 36 }, "end": { "line": 11, "column": 40 } } }, { "type": "Identifier", "name": "rxTestScheduler", "range": [ 473, 488 ], "loc": { "start": { "line": 11, "column": 42 }, "end": { "line": 11, "column": 57 } } } ], "range": [ 452, 489 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 58 } } }, "range": [ 443, 489 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 58 } } } ], "kind": "var", "range": [ 439, 490 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 59 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 499, 515 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "result", "range": [ 516, 522 ], "loc": { "start": { "line": 12, "column": 25 }, "end": { "line": 12, "column": 31 } } } ], "range": [ 499, 523 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 32 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 524, 528 ], "loc": { "start": { "line": 12, "column": 33 }, "end": { "line": 12, "column": 37 } } }, "range": [ 499, 528 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 37 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 529, 537 ], "loc": { "start": { "line": 12, "column": 38 }, "end": { "line": 12, "column": 46 } } }, { "type": "Literal", "value": null, "raw": "null", "range": [ 539, 543 ], "loc": { "start": { "line": 12, "column": 48 }, "end": { "line": 12, "column": 52 } } }, { "type": "Identifier", "name": "defaultTimeoutError", "range": [ 545, 564 ], "loc": { "start": { "line": 12, "column": 54 }, "end": { "line": 12, "column": 73 } } } ], "range": [ 499, 565 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 74 } } }, "range": [ 499, 566 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 75 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectSubscriptions", "range": [ 575, 594 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 27 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 595, 597 ], "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 30 } } }, "property": { "type": "Identifier", "name": "subscriptions", "range": [ 598, 611 ], "loc": { "start": { "line": 13, "column": 31 }, "end": { "line": 13, "column": 44 } } }, "range": [ 595, 611 ], "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 44 } } } ], "range": [ 575, 612 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 45 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 613, 617 ], "loc": { "start": { "line": 13, "column": 46 }, "end": { "line": 13, "column": 50 } } }, "range": [ 575, 617 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 50 } } }, "arguments": [ { "type": "Identifier", "name": "e1subs", "range": [ 618, 624 ], "loc": { "start": {