UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,305 lines 751 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 {race} ", "range": [ 85, 104 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 19 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 105, 113 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.race", "raw": "'Observable.race'", "range": [ 114, 131 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 26 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 151, 153 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should race a single observable", "raw": "'should race a single observable'", "range": [ 154, 187 ], "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 40 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 215, 217 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 220, 224 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": "---a-----b-----c----|", "raw": "'---a-----b-----c----|'", "range": [ 225, 248 ], "loc": { "start": { "line": 7, "column": 22 }, "end": { "line": 7, "column": 45 } } } ], "range": [ 220, 249 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 46 } } }, "range": [ 215, 249 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 46 } } } ], "kind": "var", "range": [ 211, 250 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 47 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1subs", "range": [ 263, 269 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 18 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 272, 295 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 44 } } }, "range": [ 263, 295 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 44 } } } ], "kind": "var", "range": [ 259, 296 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 45 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 309, 317 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 20 } } }, "init": { "type": "Literal", "value": "---a-----b-----c----|", "raw": "'---a-----b-----c----|'", "range": [ 320, 343 ], "loc": { "start": { "line": 9, "column": 23 }, "end": { "line": 9, "column": 46 } } }, "range": [ 309, 343 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 46 } } } ], "kind": "var", "range": [ 305, 344 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 47 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 357, 363 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Observable", "range": [ 366, 376 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 31 } } }, "property": { "type": "Identifier", "name": "race", "range": [ 377, 381 ], "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 36 } } }, "range": [ 366, 381 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 36 } } }, "arguments": [ { "type": "Identifier", "name": "e1", "range": [ 382, 384 ], "loc": { "start": { "line": 10, "column": 37 }, "end": { "line": 10, "column": 39 } } } ], "range": [ 366, 385 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 40 } } }, "range": [ 357, 385 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 40 } } } ], "kind": "var", "range": [ 353, 386 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 41 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 395, 411 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "result", "range": [ 412, 418 ], "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 31 } } } ], "range": [ 395, 419 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 32 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 420, 424 ], "loc": { "start": { "line": 11, "column": 33 }, "end": { "line": 11, "column": 37 } } }, "range": [ 395, 424 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 37 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 425, 433 ], "loc": { "start": { "line": 11, "column": 38 }, "end": { "line": 11, "column": 46 } } } ], "range": [ 395, 434 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 47 } } }, "range": [ 395, 435 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 48 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectSubscriptions", "range": [ 444, 463 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 27 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 464, 466 ], "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 30 } } }, "property": { "type": "Identifier", "name": "subscriptions", "range": [ 467, 480 ], "loc": { "start": { "line": 12, "column": 31 }, "end": { "line": 12, "column": 44 } } }, "range": [ 464, 480 ], "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 44 } } } ], "range": [ 444, 481 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 45 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 482, 486 ], "loc": { "start": { "line": 12, "column": 46 }, "end": { "line": 12, "column": 50 } } }, "range": [ 444, 486 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 50 } } }, "arguments": [ { "type": "Identifier", "name": "e1subs", "range": [ 487, 493 ], "loc": { "start": { "line": 12, "column": 51 }, "end": { "line": 12, "column": 57 } } } ], "range": [ 444, 494 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 58 } } }, "range": [ 444, 495 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 59 } } } ], "range": [ 201, 501 ], "loc": { "start": { "line": 6, "column": 54 }, "end": { "line": 13, "column": 5 } } }, "generator": false, "expression": false, "range": [ 189, 501 ], "loc": { "start": { "line": 6, "column": 42 }, "end": { "line": 13, "column": 5 } } } ], "range": [ 151, 502 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 13, "column": 6 } }, "_esdocTestId": 453, "_esdocTestName": "it453" }, "range": [ 151, 503 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 13, "column": 7 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 508, 510 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should race cold and cold", "raw": "'should race cold and cold'", "range": [ 511, 538 ], "loc": { "start": { "line": 14, "column": 7 }, "end": { "line": 14, "column": 34 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 566, 568 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 571, 575 ], "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": "---a-----b-----c----|", "raw": "'---a-----b-----c----|'", "range": [ 576, 599 ], "loc": { "start": { "line": 15, "column": 22 }, "end": { "line": 15, "column": 45 } } } ], "range": [ 571, 600 ], "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 46 } } }, "range": [ 566, 60