UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,362 lines 1.09 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": "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 {count} ", "range": [ 115, 135 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 20 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 136, 144 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.count", "raw": "'Observable.prototype.count'", "range": [ 145, 173 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 37 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 193, 202 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "count", "raw": "'count'", "range": [ 203, 210 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 21 } } } ], "range": [ 193, 211 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 22 } } }, "arguments": [ { "type": "Literal", "value": "should count the values of an observable", "raw": "'should count the values of an observable'", "range": [ 212, 254 ], "loc": { "start": { "line": 7, "column": 23 }, "end": { "line": 7, "column": 65 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source", "range": [ 282, 288 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 291, 294 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 24 } } }, "arguments": [ { "type": "Literal", "value": "--a--b--c--|", "raw": "'--a--b--c--|'", "range": [ 295, 309 ], "loc": { "start": { "line": 8, "column": 25 }, "end": { "line": 8, "column": 39 } } } ], "range": [ 291, 310 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 40 } } }, "range": [ 282, 310 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 40 } } } ], "kind": "var", "range": [ 278, 311 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 41 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "subs", "range": [ 324, 328 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 16 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 331, 345 ], "loc": { "start": { "line": 9, "column": 19 }, "end": { "line": 9, "column": 33 } } }, "range": [ 324, 345 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 33 } } } ], "kind": "var", "range": [ 320, 346 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 34 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 359, 367 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 20 } } }, "init": { "type": "Literal", "value": "-----------(x|)", "raw": "'-----------(x|)'", "range": [ 370, 387 ], "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 40 } } }, "range": [ 359, 387 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 40 } } } ], "kind": "var", "range": [ 355, 388 ], "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": [ 397, 413 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 24 } } }, "arguments": [ { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 414, 420 ], "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 31 } } }, "property": { "type": "Identifier", "name": "count", "range": [ 421, 426 ], "loc": { "start": { "line": 11, "column": 32 }, "end": { "line": 11, "column": 37 } } }, "range": [ 414, 426 ], "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 37 } } }, "arguments": [], "range": [ 414, 428 ], "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 39 } } } ], "range": [ 397, 429 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 40 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 430, 434 ], "loc": { "start": { "line": 11, "column": 41 }, "end": { "line": 11, "column": 45 } } }, "range": [ 397, 434 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 45 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 435, 443 ], "loc": { "start": { "line": 11, "column": 46 }, "end": { "line": 11, "column": 54 } } }, { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 447, 448 ], "loc": { "start": { "line": 11, "column": 58 }, "end": { "line": 11, "column": 59 } } }, "value": { "type": "Literal", "value": 3, "raw": "3", "range": [ 450, 451 ], "loc": { "start": { "line": 11, "column": 61 }, "end": { "line": 11, "column": 62 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 447, 451 ], "loc": { "start": { "line": 11, "column": 58 }, "end": { "line": 11, "column": 62 } } } ], "range": [ 445, 453 ], "loc": { "start": { "line": 11, "column": 56 }, "end": { "line": 11, "column": 64 } } } ], "range": [ 397, 454 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 65 } } }, "range": [ 397, 455 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 66 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectSubscriptions", "range": [ 464, 483 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 27 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 484, 490 ], "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 34 } } }, "property": { "type": "Identifier", "name": "subscriptions", "range": [ 491, 504 ], "loc": { "start": { "line": 12, "column": 35 }, "end": { "line": 12, "column": 48 } } }, "range": [ 484, 504 ], "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 48 } } } ], "range": [ 464, 505 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 49 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 506, 510 ], "loc": { "start": { "line": 12, "column": 50 }, "end": { "line": 12, "column": 54 } } }, "range": [ 464, 510 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 54 } } }, "arguments": [ { "type": "Identifier", "name": "subs", "range": [ 511, 515 ], "loc": { "start": { "line": 12, "column": 55 }, "end": { "line": 12, "column": 59 } } } ], "range": [ 464, 516 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 60 } } }, "range": [ 464, 517 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 61 } } } ], "range": [ 268, 523 ], "loc": { "start": { "line": 7, "column": 79 }, "end": { "line": 13, "column": 5 } } }, "generator": false, "expression": false, "range": [ 256, 523 ], "loc": { "start": { "line": 7, "column": 67 }, "end": { "line": 13, "column": 5 } } } ], "range": [ 193, 524 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 13, "column": 6 } } }, "range": [ 193, 525 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 13, "column": 7 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 530, 532 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should be never when source is never", "raw": "'should be never when source is never'", "range": [ 533, 571 ], "loc": { "start": { "line": 14, "column": 7 }, "end": { "line": 14, "column": 45 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "