UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,330 lines (1,329 loc) 999 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 {merge} ", "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.merge(...observables)", "raw": "'Observable.merge(...observables)'", "range": [ 145, 179 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 43 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 199, 201 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "should merge cold and cold", "raw": "'should merge cold and cold'", "range": [ 202, 230 ], "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 35 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 258, 260 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 263, 267 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": "---a-----b-----c----|", "raw": "'---a-----b-----c----|'", "range": [ 268, 291 ], "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 45 } } } ], "range": [ 263, 292 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 46 } } }, "range": [ 258, 292 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 46 } } } ], "kind": "var", "range": [ 254, 293 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 47 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1subs", "range": [ 306, 312 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 18 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 315, 338 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 44 } } }, "range": [ 306, 338 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 44 } } } ], "kind": "var", "range": [ 302, 339 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 45 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e2", "range": [ 352, 354 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 357, 361 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": "------x-----y-----z----|", "raw": "'------x-----y-----z----|'", "range": [ 362, 388 ], "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 48 } } } ], "range": [ 357, 389 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 49 } } }, "range": [ 352, 389 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 49 } } } ], "kind": "var", "range": [ 348, 390 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 50 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e2subs", "range": [ 403, 409 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 18 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 412, 438 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 47 } } }, "range": [ 403, 438 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 47 } } } ], "kind": "var", "range": [ 399, 439 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 48 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 452, 460 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 20 } } }, "init": { "type": "Literal", "value": "---a--x--b--y--c--z----|", "raw": "'---a--x--b--y--c--z----|'", "range": [ 463, 489 ], "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 49 } } }, "range": [ 452, 489 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 49 } } } ], "kind": "var", "range": [ 448, 490 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 50 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 503, 509 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Observable", "range": [ 512, 522 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 31 } } }, "property": { "type": "Identifier", "name": "merge", "range": [ 523, 528 ], "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 37 } } }, "range": [ 512, 528 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 37 } } }, "arguments": [ { "type": "Identifier", "name": "e1", "range": [ 529, 531 ], "loc": { "start": { "line": 13, "column": 38 }, "end": { "line": 13, "column": 40 } } }, { "type": "Identifier", "name": "e2", "range": [ 533, 535 ], "loc": { "start": { "line": 13, "column": 42 }, "end": { "line": 13, "column": 44 } } } ], "range": [ 512, 536 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 45 } } }, "range": [ 503, 536 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 45 } } } ], "kind": "var", "range": [ 499, 537 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 46 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 546, 562 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "result", "range": [ 563, 569 ], "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 31 } } } ], "range": [ 546, 570 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 32 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 571, 575 ], "loc": { "start": { "line": 14, "column": 33 }, "end": { "line": 14, "column": 37 } } }, "range": [ 546, 575 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 37 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 576, 584 ], "loc": { "start": { "line": 14, "column": 38 }, "end": { "line": 14, "column": 46 } } } ], "range": [ 546, 585 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 47 } } }, "range": [ 546, 586 ], "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": [ 595, 614 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 27 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 615, 617 ], "loc": { "start": { "line": 15, "column": 28 }, "end": { "line": 15, "column": 30 } } }, "property": { "type": "Identifier", "name": "subscriptions", "range": [ 618, 631 ], "loc": { "start": { "line": 15, "column": 31 }, "end": { "line": 15, "column": 44 } } }, "range": [ 615, 631 ], "loc": { "start": { "line": 15, "column": 28 }, "end": { "line": 15, "column": 44 } } } ], "range": [ 595, 632 ], "loc": {