UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,422 lines (1,421 loc) 441 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, 110 ], "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 36 } } } ], "range": [ 83, 111 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 37 } } }, "range": [ 78, 111 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 37 } } } ], "kind": "var", "range": [ 74, 112 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "asap", "range": [ 117, 121 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 8 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 124, 126 ], "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 13 } } }, "property": { "type": "Identifier", "name": "Scheduler", "range": [ 127, 136 ], "loc": { "start": { "line": 5, "column": 14 }, "end": { "line": 5, "column": 23 } } }, "range": [ 124, 136 ], "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 23 } } }, "property": { "type": "Identifier", "name": "asap", "range": [ 137, 141 ], "loc": { "start": { "line": 5, "column": 24 }, "end": { "line": 5, "column": 28 } } }, "range": [ 124, 141 ], "loc": { "start": { "line": 5, "column": 11 }, "end": { "line": 5, "column": 28 } } }, "range": [ 117, 141 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 28 } } } ], "kind": "var", "range": [ 113, 142 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 29 } }, "trailingComments": [ { "type": "Block", "value": "* @test {Scheduler} ", "range": [ 143, 167 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 24 } } } ] }, { "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": "Scheduler.asap", "raw": "'Scheduler.asap'", "range": [ 177, 193 ], "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 25 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 213, 215 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should exist", "raw": "'should exist'", "range": [ 216, 230 ], "loc": { "start": { "line": 8, "column": 7 }, "end": { "line": 8, "column": 21 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "chai_1", "range": [ 254, 260 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 14 } } }, "property": { "type": "Identifier", "name": "expect", "range": [ 261, 267 ], "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 9, "column": 21 } } }, "range": [ 254, 267 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 21 } } }, "arguments": [ { "type": "Identifier", "name": "asap", "range": [ 268, 272 ], "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 9, "column": 26 } } } ], "range": [ 254, 273 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 27 } } }, "property": { "type": "Identifier", "name": "exist", "range": [ 274, 279 ], "loc": { "start": { "line": 9, "column": 28 }, "end": { "line": 9, "column": 33 } } }, "range": [ 254, 279 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 33 } } }, "range": [ 254, 280 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 34 } } } ], "range": [ 244, 286 ], "loc": { "start": { "line": 8, "column": 35 }, "end": { "line": 10, "column": 5 } } }, "generator": false, "expression": false, "range": [ 232, 286 ], "loc": { "start": { "line": 8, "column": 23 }, "end": { "line": 10, "column": 5 } } } ], "range": [ 213, 287 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 10, "column": 6 } }, "_esdocTestId": 2350, "_esdocTestName": "it2350" }, "range": [ 213, 288 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 10, "column": 7 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 293, 295 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should act like the async scheduler if delay > 0", "raw": "'should act like the async scheduler if delay > 0'", "range": [ 296, 346 ], "loc": { "start": { "line": 11, "column": 7 }, "end": { "line": 11, "column": 57 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "actionHappened", "range": [ 374, 388 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 26 } } }, "init": { "type": "Literal", "value": false, "raw": "false", "range": [ 391, 396 ], "loc": { "start": { "line": 12, "column": 29 }, "end": { "line": 12, "column": 34 } } }, "range": [ 374, 396 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 34 } } } ], "kind": "var", "range": [ 370, 397 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 35 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "sandbox", "range": [ 410, 417 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 19 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "sinon", "range": [ 420, 425 ], "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 27 } } }, "property": { "type": "Identifier", "name": "sandbox", "range": [ 426, 433 ], "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 35 } } }, "range": [ 420, 433 ], "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 35 } } }, "property": { "type": "Identifier", "name": "create", "range": [ 434, 440 ], "loc": { "start": { "line": 13, "column": 36 }, "end": { "line": 13, "column": 42 } } }, "range": [ 420, 440 ], "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 42 } } }, "arguments": [], "range": [ 420, 442 ], "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 44 } } }, "range": [ 410, 442 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 44 } } } ], "kind": "var", "range": [ 406, 443 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 45 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "fakeTimer", "range": [ 456, 465 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 21 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "sandbox", "range": [ 468, 475 ], "loc": { "start": { "line": 14, "column": 24 }, "end": { "line": 14, "column": 31 } } }, "property": { "type": "Identifier", "name": "useFakeTimers", "range": [ 476, 489 ], "loc": { "start": { "line": 14, "column": 32 }, "end": { "line": 14, "column": 45 } } }, "range": [ 468, 489 ], "loc": { "start": { "line": 14, "column": 24 }, "end": { "line": 14, "column": 45 } } }, "arguments": [], "range": [ 468, 491 ], "loc": { "start": { "line": 14, "column": 24 }, "end": { "line": 14, "column": 47 } } }, "range": [ 456, 491 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 47 } } } ], "kind": "var", "range": [ 452, 492 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 48 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "asap", "range": [ 501, 505 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 12 } } }, "property": { "type": "Identifier", "name": "schedule", "range": [ 506, 514 ], "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 21 } } }, "range": [ 501, 514 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 21 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "actionHappened", "range": [ 541, 555 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 26 } } }, "right": { "type": "Literal", "value": true, "raw": "true", "range": [ 558, 562 ], "loc": { "start": { "line": 16, "column": 29 }, "end": { "line": 16, "column": 33 } } }, "range": [ 541, 562 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 33 } } }, "range": [ 541, 563 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 34 } } } ], "range": [ 527, 573 ], "loc": { "start": { "line": 15, "column": 34 }, "end": { "line": 17, "column": 9 } } }, "generator": false, "expression": false, "range": [ 515, 573 ], "loc": { "start": { "line": 15,