UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,298 lines (1,297 loc) 421 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 {sampleTime} ", "range": [ 85, 110 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 25 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 111, 119 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.sampleTime", "raw": "'Observable.prototype.sampleTime'", "range": [ 120, 153 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 42 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 173, 182 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "sampleTime(70)", "raw": "'sampleTime(70)'", "range": [ 183, 199 ], "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 30 } } } ], "range": [ 173, 200 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 31 } } }, "arguments": [ { "type": "Literal", "value": "should get samples on a delay", "raw": "'should get samples on a delay'", "range": [ 201, 232 ], "loc": { "start": { "line": 6, "column": 32 }, "end": { "line": 6, "column": 63 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 260, 262 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 265, 268 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "a---b-c---------d--e---f-g-h--|", "raw": "'a---b-c---------d--e---f-g-h--|'", "range": [ 269, 302 ], "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 54 } } } ], "range": [ 265, 303 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 55 } } }, "range": [ 260, 303 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 55 } } } ], "kind": "var", "range": [ 256, 304 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 56 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1subs", "range": [ 317, 323 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 18 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 326, 359 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 54 } } }, "range": [ 317, 359 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 54 } } } ], "kind": "var", "range": [ 313, 360 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 55 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 373, 381 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 20 } } }, "init": { "type": "Literal", "value": "-------c-------------e------h-|", "raw": "'-------c-------------e------h-|'", "range": [ 384, 417 ], "loc": { "start": { "line": 9, "column": 23 }, "end": { "line": 9, "column": 56 } } }, "range": [ 373, 417 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 56 } } } ], "kind": "var", "range": [ 369, 418 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 57 } }, "trailingComments": [ { "type": "Line", "value": " timer -------!------!------!------!--", "range": [ 427, 476 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 57 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 485, 501 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 24 } } }, "arguments": [ { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 502, 504 ], "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 27 } } }, "property": { "type": "Identifier", "name": "sampleTime", "range": [ 505, 515 ], "loc": { "start": { "line": 11, "column": 28 }, "end": { "line": 11, "column": 38 } } }, "range": [ 502, 515 ], "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 38 } } }, "arguments": [ { "type": "Literal", "value": 70, "raw": "70", "range": [ 516, 518 ], "loc": { "start": { "line": 11, "column": 39 }, "end": { "line": 11, "column": 41 } } }, { "type": "Identifier", "name": "rxTestScheduler", "range": [ 520, 535 ], "loc": { "start": { "line": 11, "column": 43 }, "end": { "line": 11, "column": 58 } } } ], "range": [ 502, 536 ], "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 59 } } } ], "range": [ 485, 537 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 60 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 538, 542 ], "loc": { "start": { "line": 11, "column": 61 }, "end": { "line": 11, "column": 65 } } }, "range": [ 485, 542 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 65 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 543, 551 ], "loc": { "start": { "line": 11, "column": 66 }, "end": { "line": 11, "column": 74 } } } ], "range": [ 485, 552 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 75 } } }, "range": [ 485, 553 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 76 } }, "leadingComments": [ { "type": "Line", "value": " timer -------!------!------!------!--", "range": [ 427, 476 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 57 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectSubscriptions", "range": [ 562, 581 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 27 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 582, 584 ], "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 30 } } }, "property": { "type": "Identifier", "name": "subscriptions", "range": [ 585, 598 ], "loc": { "start": { "line": 12, "column": 31 }, "end": { "line": 12, "column": 44 } } }, "range": [ 582, 598 ], "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 44 } } } ], "range": [ 562, 599 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 45 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 600, 604 ], "loc": { "start": { "line": 12, "column": 46 }, "end": { "line": 12, "column": 50 } } }, "range": [ 562, 604 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 50 } } }, "arguments": [ { "type": "Identifier", "name": "e1subs", "range": [ 605, 611 ], "loc": { "start": { "line": 12, "column": 51 }, "end": { "line": 12, "column": 57 } } } ], "range": [ 562, 612 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 58 } } }, "range": [ 562, 613 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 59 } } } ], "range": [ 246, 619 ], "loc": { "start": { "line": 6, "column": 77 }, "end": { "line": 13, "column": 5 } } }, "generator": false, "expression": false, "range": [ 234, 619 ], "loc": { "start": { "line": 6, "column": 65 }, "end": { "line": 13, "column": 5 } } } ], "range": [ 173, 620 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 13, "column": 6 } } }, "range": [ 173, 621 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 13, "column": 7 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 626, 628 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should sample nothing if new value has not arrived", "raw": "'should sample nothing if new value has not arrived'", "range": [ 629, 681 ], "loc": { "start": { "line": 14, "column": 7 }, "end": { "line": 14, "column": 59 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 709, 711 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 714, 717 ], "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "----a-^--b----c--------------f----|", "raw": "'----a-^--b----c--------------f----|'", "range": [ 718, 755 ],