UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,307 lines (1,306 loc) 295 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 {subscribeOn} ", "range": [ 85, 111 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 26 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 112, 120 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.subscribeOn", "raw": "'Observable.prototype.subscribeOn'", "range": [ 121, 155 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 43 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 175, 184 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "subscribeOn(scheduler)", "raw": "'subscribeOn(scheduler)'", "range": [ 185, 209 ], "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 38 } } } ], "range": [ 175, 210 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 39 } } }, "arguments": [ { "type": "Literal", "value": "should subscribe on specified scheduler", "raw": "'should subscribe on specified scheduler'", "range": [ 211, 252 ], "loc": { "start": { "line": 6, "column": 40 }, "end": { "line": 6, "column": 81 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 280, 282 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 285, 288 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "--a--b--|", "raw": "'--a--b--|'", "range": [ 289, 300 ], "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 32 } } } ], "range": [ 285, 301 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 33 } } }, "range": [ 280, 301 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 33 } } } ], "kind": "var", "range": [ 276, 302 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 34 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 315, 323 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 20 } } }, "init": { "type": "Literal", "value": "--a--b--|", "raw": "'--a--b--|'", "range": [ 326, 337 ], "loc": { "start": { "line": 8, "column": 23 }, "end": { "line": 8, "column": 34 } } }, "range": [ 315, 337 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 34 } } } ], "kind": "var", "range": [ 311, 338 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 35 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "sub", "range": [ 351, 354 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 15 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 357, 368 ], "loc": { "start": { "line": 9, "column": 18 }, "end": { "line": 9, "column": 29 } } }, "range": [ 351, 368 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 29 } } } ], "kind": "var", "range": [ 347, 369 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 30 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 378, 394 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 24 } } }, "arguments": [ { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 395, 397 ], "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 27 } } }, "property": { "type": "Identifier", "name": "subscribeOn", "range": [ 398, 409 ], "loc": { "start": { "line": 10, "column": 28 }, "end": { "line": 10, "column": 39 } } }, "range": [ 395, 409 ], "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 39 } } }, "arguments": [ { "type": "Identifier", "name": "rxTestScheduler", "range": [ 410, 425 ], "loc": { "start": { "line": 10, "column": 40 }, "end": { "line": 10, "column": 55 } } } ], "range": [ 395, 426 ], "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 56 } } } ], "range": [ 378, 427 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 57 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 428, 432 ], "loc": { "start": { "line": 10, "column": 58 }, "end": { "line": 10, "column": 62 } } }, "range": [ 378, 432 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 62 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 433, 441 ], "loc": { "start": { "line": 10, "column": 63 }, "end": { "line": 10, "column": 71 } } } ], "range": [ 378, 442 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 72 } } }, "range": [ 378, 443 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 73 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectSubscriptions", "range": [ 452, 471 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 27 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 472, 474 ], "loc": { "start": { "line": 11, "column": 28 }, "end": { "line": 11, "column": 30 } } }, "property": { "type": "Identifier", "name": "subscriptions", "range": [ 475, 488 ], "loc": { "start": { "line": 11, "column": 31 }, "end": { "line": 11, "column": 44 } } }, "range": [ 472, 488 ], "loc": { "start": { "line": 11, "column": 28 }, "end": { "line": 11, "column": 44 } } } ], "range": [ 452, 489 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 45 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 490, 494 ], "loc": { "start": { "line": 11, "column": 46 }, "end": { "line": 11, "column": 50 } } }, "range": [ 452, 494 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 50 } } }, "arguments": [ { "type": "Identifier", "name": "sub", "range": [ 495, 498 ], "loc": { "start": { "line": 11, "column": 51 }, "end": { "line": 11, "column": 54 } } } ], "range": [ 452, 499 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 55 } } }, "range": [ 452, 500 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 56 } } } ], "range": [ 266, 506 ], "loc": { "start": { "line": 6, "column": 95 }, "end": { "line": 12, "column": 5 } } }, "generator": false, "expression": false, "range": [ 254, 506 ], "loc": { "start": { "line": 6, "column": 83 }, "end": { "line": 12, "column": 5 } } } ], "range": [ 175, 507 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 12, "column": 6 } } }, "range": [ 175, 508 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 12, "column": 7 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 513, 515 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should start subscribe after specified delay", "raw": "'should start subscribe after specified delay'", "range": [ 516, 562 ], "loc": { "start": { "line": 13, "column": 7 }, "end": { "line": 13, "column": 53 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 590, 592 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 595, 598 ], "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 14, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "--a--b--|", "raw": "'--a--b--|'", "range": [ 599, 610 ], "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 32 } } } ], "range": [ 595, 611 ], "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 14, "column": 33 } } }, "range": [ 590, 611 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 33 } } } ], "kind": "var", "range": [ 586, 612 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 34 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [