UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,247 lines (1,246 loc) 298 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 } }, "trailingComments": [ { "type": "Block", "value": "* @test {isEmpty} ", "range": [ 53, 75 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 22 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 76, 84 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.isEmpty", "raw": "'Observable.prototype.isEmpty'", "range": [ 85, 115 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 39 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 135, 144 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "isEmpty", "raw": "'isEmpty'", "range": [ 145, 154 ], "loc": { "start": { "line": 5, "column": 14 }, "end": { "line": 5, "column": 23 } } } ], "range": [ 135, 155 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 24 } } }, "arguments": [ { "type": "Literal", "value": "should return true if source is empty", "raw": "'should return true if source is empty'", "range": [ 156, 195 ], "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 5, "column": 64 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source", "range": [ 223, 229 ], "loc": { "start": { "line": 6, "column": 12 }, "end": { "line": 6, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 232, 235 ], "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 24 } } }, "arguments": [ { "type": "Literal", "value": "-----|", "raw": "'-----|'", "range": [ 236, 244 ], "loc": { "start": { "line": 6, "column": 25 }, "end": { "line": 6, "column": 33 } } } ], "range": [ 232, 245 ], "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 34 } } }, "range": [ 223, 245 ], "loc": { "start": { "line": 6, "column": 12 }, "end": { "line": 6, "column": 34 } } } ], "kind": "var", "range": [ 219, 246 ], "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 35 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "subs", "range": [ 259, 263 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 16 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 266, 274 ], "loc": { "start": { "line": 7, "column": 19 }, "end": { "line": 7, "column": 27 } } }, "range": [ 259, 274 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 27 } } } ], "kind": "var", "range": [ 255, 275 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 28 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 288, 296 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 20 } } }, "init": { "type": "Literal", "value": "-----(T|)", "raw": "'-----(T|)'", "range": [ 299, 310 ], "loc": { "start": { "line": 8, "column": 23 }, "end": { "line": 8, "column": 34 } } }, "range": [ 288, 310 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 34 } } } ], "kind": "var", "range": [ 284, 311 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 35 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 320, 336 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 24 } } }, "arguments": [ { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 337, 343 ], "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 31 } } }, "property": { "type": "Identifier", "name": "isEmpty", "range": [ 344, 351 ], "loc": { "start": { "line": 9, "column": 32 }, "end": { "line": 9, "column": 39 } } }, "range": [ 337, 351 ], "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 39 } } }, "arguments": [], "range": [ 337, 353 ], "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 41 } } } ], "range": [ 320, 354 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 42 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 355, 359 ], "loc": { "start": { "line": 9, "column": 43 }, "end": { "line": 9, "column": 47 } } }, "range": [ 320, 359 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 47 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 360, 368 ], "loc": { "start": { "line": 9, "column": 48 }, "end": { "line": 9, "column": 56 } } }, { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "T", "range": [ 372, 373 ], "loc": { "start": { "line": 9, "column": 60 }, "end": { "line": 9, "column": 61 } } }, "value": { "type": "Literal", "value": true, "raw": "true", "range": [ 375, 379 ], "loc": { "start": { "line": 9, "column": 63 }, "end": { "line": 9, "column": 67 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 372, 379 ], "loc": { "start": { "line": 9, "column": 60 }, "end": { "line": 9, "column": 67 } } } ], "range": [ 370, 381 ], "loc": { "start": { "line": 9, "column": 58 }, "end": { "line": 9, "column": 69 } } } ], "range": [ 320, 382 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 70 } } }, "range": [ 320, 383 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 71 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectSubscriptions", "range": [ 392, 411 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 27 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 412, 418 ], "loc": { "start": { "line": 10, "column": 28 }, "end": { "line": 10, "column": 34 } } }, "property": { "type": "Identifier", "name": "subscriptions", "range": [ 419, 432 ], "loc": { "start": { "line": 10, "column": 35 }, "end": { "line": 10, "column": 48 } } }, "range": [ 412, 432 ], "loc": { "start": { "line": 10, "column": 28 }, "end": { "line": 10, "column": 48 } } } ], "range": [ 392, 433 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 49 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 434, 438 ], "loc": { "start": { "line": 10, "column": 50 }, "end": { "line": 10, "column": 54 } } }, "range": [ 392, 438 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 54 } } }, "arguments": [ { "type": "Identifier", "name": "subs", "range": [ 439, 443 ], "loc": { "start": { "line": 10, "column": 55 }, "end": { "line": 10, "column": 59 } } } ], "range": [ 392, 444 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 60 } } }, "range": [ 392, 445 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 61 } } } ], "range": [ 209, 451 ], "loc": { "start": { "line": 5, "column": 78 }, "end": { "line": 11, "column": 5 } } }, "generator": false, "expression": false, "range": [ 197, 451 ], "loc": { "start": { "line": 5, "column": 66 }, "end": { "line": 11, "column": 5 } } } ], "range": [ 135, 452 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 11, "column": 6 } } }, "range": [ 135, 453 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 11, "column": 7 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 458, 460 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should return false if source emits element", "raw": "'should return false if source emits element'", "range": [ 461, 506 ], "loc": { "start": { "line": 12, "column": 7 }, "end": { "line": 12, "column": 52 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source", "range": [ 534, 540 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 543, 546 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 24 } } }, "arguments": [ { "type": "Literal", "value": "--a--^--b--|", "raw": "'--a--^--b--|'", "range": [ 547, 561 ], "loc": { "start": { "line": 13, "column": 25 }, "end": { "line": 13, "column": 39 } } } ], "range": [ 543, 562 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 40 } } }, "range": [ 534, 562 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 40 } } } ], "kind": "var", "range": [ 530, 563 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 41 } } },