UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,333 lines (1,332 loc) 688 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": "Rx", "range": [ 48, 50 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 6 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 53, 60 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 16 } } }, "arguments": [ { "type": "Literal", "value": "../../dist/cjs/Rx", "raw": "'../../dist/cjs/Rx'", "range": [ 61, 80 ], "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 36 } } } ], "range": [ 53, 81 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 37 } } }, "range": [ 48, 81 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 37 } } } ], "kind": "var", "range": [ 44, 82 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Observable", "range": [ 87, 97 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 14 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 100, 102 ], "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 19 } } }, "property": { "type": "Identifier", "name": "Observable", "range": [ 103, 113 ], "loc": { "start": { "line": 4, "column": 20 }, "end": { "line": 4, "column": 30 } } }, "range": [ 100, 113 ], "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 30 } } }, "range": [ 87, 113 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 30 } } } ], "kind": "var", "range": [ 83, 114 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 31 } }, "trailingComments": [ { "type": "Block", "value": "* @test {race} ", "range": [ 115, 134 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 19 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 135, 143 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.race", "raw": "'Observable.prototype.race'", "range": [ 144, 171 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 36 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 191, 193 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should race cold and cold", "raw": "'should race cold and cold'", "range": [ 194, 221 ], "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 34 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 249, 251 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 254, 258 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": "---a-----b-----c----|", "raw": "'---a-----b-----c----|'", "range": [ 259, 282 ], "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 45 } } } ], "range": [ 254, 283 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 46 } } }, "range": [ 249, 283 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 46 } } } ], "kind": "var", "range": [ 245, 284 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 47 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1subs", "range": [ 297, 303 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 18 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 306, 329 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 44 } } }, "range": [ 297, 329 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 44 } } } ], "kind": "var", "range": [ 293, 330 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 45 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e2", "range": [ 343, 345 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 348, 352 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": "------x-----y-----z----|", "raw": "'------x-----y-----z----|'", "range": [ 353, 379 ], "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 48 } } } ], "range": [ 348, 380 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 49 } } }, "range": [ 343, 380 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 49 } } } ], "kind": "var", "range": [ 339, 381 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 50 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e2subs", "range": [ 394, 400 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 18 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 403, 409 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 27 } } }, "range": [ 394, 409 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 27 } } } ], "kind": "var", "range": [ 390, 410 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 28 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 423, 431 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 20 } } }, "init": { "type": "Literal", "value": "---a-----b-----c----|", "raw": "'---a-----b-----c----|'", "range": [ 434, 457 ], "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 46 } } }, "range": [ 423, 457 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 46 } } } ], "kind": "var", "range": [ 419, 458 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 47 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 471, 477 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 480, 482 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 23 } } }, "property": { "type": "Identifier", "name": "race", "range": [ 483, 487 ], "loc": { "start": { "line": 13, "column": 24 }, "end": { "line": 13, "column": 28 } } }, "range": [ 480, 487 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 28 } } }, "arguments": [ { "type": "Identifier", "name": "e2", "range": [ 488, 490 ], "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 31 } } } ], "range": [ 480, 491 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 32 } } }, "range": [ 471, 491 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 32 } } } ], "kind": "var", "range": [ 467, 492 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 33 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 501, 517 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "result", "range": [ 518, 524 ], "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 31 } } } ], "range": [ 501, 525 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 32 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 526, 530 ], "loc": { "start": { "line": 14, "column": 33 }, "end": { "line": 14, "column": 37 } } }, "range": [ 501, 530 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 37 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 531, 539 ], "loc": { "start": { "line": 14, "column": 38 }, "end": { "line": 14, "column": 46 } } } ], "range": [ 501, 540 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 47 } } }, "range": [ 501, 541 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 48 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectSubscriptions", "range": [ 550, 569 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 27 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 570, 572 ], "loc": { "start": { "line": 15, "column": 28 }, "end": { "line": 15, "column": 30 } } }, "property": { "type": "Identifier", "name": "subscriptions", "range": [ 573, 586 ], "loc": { "start": { "line": 15, "column": 31 }, "end": { "line": 15, "column": 44 } } }, "range": [ 570, 586 ], "loc": { "start": { "line": 15, "column": 28 }, "end": { "line": 15, "column": 44 } } } ], "range": [ 550, 587 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 45 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 588, 592 ], "loc": { "start": { "line": 15, "column": 46