UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,506 lines (1,505 loc) 3.3 MB
{ "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, 113 ], "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 39 } } } ], "range": [ 83, 114 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 40 } } }, "range": [ 78, 114 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 40 } } } ], "kind": "var", "range": [ 74, 115 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 41 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "root_1", "range": [ 120, 126 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 10 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 129, 136 ], "loc": { "start": { "line": 5, "column": 13 }, "end": { "line": 5, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "../../../dist/cjs/util/root", "raw": "'../../../dist/cjs/util/root'", "range": [ 137, 166 ], "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 50 } } } ], "range": [ 129, 167 ], "loc": { "start": { "line": 5, "column": 13 }, "end": { "line": 5, "column": 51 } } }, "range": [ 120, 167 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 51 } } } ], "kind": "var", "range": [ 116, 168 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 52 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "ajax_helper_1", "range": [ 173, 186 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 17 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 189, 196 ], "loc": { "start": { "line": 6, "column": 20 }, "end": { "line": 6, "column": 27 } } }, "arguments": [ { "type": "Literal", "value": "../../helpers/ajax-helper", "raw": "'../../helpers/ajax-helper'", "range": [ 197, 224 ], "loc": { "start": { "line": 6, "column": 28 }, "end": { "line": 6, "column": 55 } } } ], "range": [ 189, 225 ], "loc": { "start": { "line": 6, "column": 20 }, "end": { "line": 6, "column": 56 } } }, "range": [ 173, 225 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 56 } } } ], "kind": "var", "range": [ 169, 226 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 57 } }, "trailingComments": [ { "type": "Block", "value": "* @test {ajax} ", "range": [ 227, 246 ], "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 19 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 247, 255 ], "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.ajax", "raw": "'Observable.ajax'", "range": [ 256, 273 ], "loc": { "start": { "line": 8, "column": 9 }, "end": { "line": 8, "column": 26 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "gXHR", "range": [ 297, 301 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 12 } } }, "init": null, "range": [ 297, 301 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 12 } } } ], "kind": "var", "range": [ 293, 302 ], "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 13 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "rXHR", "range": [ 311, 315 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "init": null, "range": [ 311, 315 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } } ], "kind": "var", "range": [ 307, 316 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 13 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "sandbox", "range": [ 325, 332 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 15 } } }, "init": null, "range": [ 325, 332 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 15 } } } ], "kind": "var", "range": [ 321, 333 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 16 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "beforeEach", "range": [ 338, 348 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 14 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "sandbox", "range": [ 371, 378 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 15 } } }, "right": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "sinon", "range": [ 381, 386 ], "loc": { "start": { "line": 13, "column": 18 }, "end": { "line": 13, "column": 23 } } }, "property": { "type": "Identifier", "name": "sandbox", "range": [ 387, 394 ], "loc": { "start": { "line": 13, "column": 24 }, "end": { "line": 13, "column": 31 } } }, "range": [ 381, 394 ], "loc": { "start": { "line": 13, "column": 18 }, "end": { "line": 13, "column": 31 } } }, "property": { "type": "Identifier", "name": "create", "range": [ 395, 401 ], "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 38 } } }, "range": [ 381, 401 ], "loc": { "start": { "line": 13, "column": 18 }, "end": { "line": 13, "column": 38 } } }, "arguments": [], "range": [ 381, 403 ], "loc": { "start": { "line": 13, "column": 18 }, "end": { "line": 13, "column": 40 } } }, "range": [ 371, 403 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 40 } } }, "range": [ 371, 404 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 41 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "gXHR", "range": [ 413, 417 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 12 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "global", "range": [ 420, 426 ], "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 21 } } }, "property": { "type": "Identifier", "name": "XMLHttpRequest", "range": [ 427, 441 ], "loc": { "start": { "line": 14, "column": 22 }, "end": { "line": 14, "column": 36 } } }, "range": [ 420, 441 ], "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 36 } } }, "range": [ 413, 441 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 36 } } }, "range": [ 413, 442 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 37 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "rXHR", "range": [ 451, 455 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 12 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "root_1", "range": [ 458, 464 ], "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 15, "column": 21 } } }, "property": { "type": "Identifier", "name": "root", "range": [ 465, 469 ], "loc": { "start": { "line": 15, "column": 22 }, "end": { "line": 15, "column": 26 } } }, "range": [ 458, 469 ], "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 15, "column": 26 } } }, "property": { "type": "Identifier", "name": "XMLHttpRequest", "range": [ 470, 484 ], "loc": { "start": { "line": 15, "column": 27 }, "end": { "line": 15, "column": 41 } } }, "range": [ 458, 484 ], "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 15, "column": 41 } } }, "range": [ 451, 484 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 41 } } }, "range": [ 451, 485 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 42 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "global", "range": [ 494, 500 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 14 } } }, "property": { "type": "Identifier", "name": "XMLHttpRequest", "range": [ 501, 515 ], "loc": { "start": { "line": 16, "column": 15 }, "end": { "line": 16, "column": 29 } } }, "range": [ 494, 515 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 29 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "ajax_helper_1", "range": [ 518, 531 ], "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 45 } } }, "property": { "type": "Identifier", "name": "MockXMLHttpRequest", "range": [ 532, 550 ], "loc": { "start": { "line": 16, "column": 46 }, "end": { "line": 16, "column": 64 } } }, "range": [ 518, 550 ], "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 64 } } }, "range": [ 494, 550 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 64 } } }, "range": [ 494, 551 ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 65 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "root_1", "range": [ 560, 566 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 14 } } }, "property": { "type": "Identifier", "name": "root", "range": [ 567, 571 ], "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 19 } } }, "range": [ 560, 571 ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 19 } } }, "property": { "type": "Identifier", "name": "XMLHttpRequest", "range": [ 572, 586 ], "loc": { "start": { "line": 17, "column": 20 }, "end": { "line": 17, "column": 34 } } }, "range": [ 560, 586 ], "loc": { "start": { "line": 17, "column": 8 }, "end": {