@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,311 lines (1,310 loc) • 564 kB
JSON
{
"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
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {last} ",
"range": [
83,
102
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 19
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
103,
111
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.last",
"raw": "'Observable.prototype.last'",
"range": [
112,
139
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 36
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
159,
168
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "last",
"raw": "'last'",
"range": [
169,
175
],
"loc": {
"start": {
"line": 6,
"column": 14
},
"end": {
"line": 6,
"column": 20
}
}
}
],
"range": [
159,
176
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 21
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should take the last value of an observable",
"raw": "'should take the last value of an observable'",
"range": [
177,
222
],
"loc": {
"start": {
"line": 6,
"column": 22
},
"end": {
"line": 6,
"column": 67
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
250,
252
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
255,
258
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--a----b--c--|",
"raw": "'--a----b--c--|'",
"range": [
259,
275
],
"loc": {
"start": {
"line": 7,
"column": 21
},
"end": {
"line": 7,
"column": 37
}
}
}
],
"range": [
255,
276
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 38
}
}
},
"range": [
250,
276
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 38
}
}
}
],
"kind": "var",
"range": [
246,
277
],
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 39
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1subs",
"range": [
290,
296
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 18
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
299,
315
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 37
}
}
},
"range": [
290,
315
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 37
}
}
}
],
"kind": "var",
"range": [
286,
316
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 38
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
329,
337
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "-------------(c|)",
"raw": "'-------------(c|)'",
"range": [
340,
359
],
"loc": {
"start": {
"line": 9,
"column": 23
},
"end": {
"line": 9,
"column": 42
}
}
},
"range": [
329,
359
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 42
}
}
}
],
"kind": "var",
"range": [
325,
360
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 43
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
369,
385
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 24
}
}
},
"arguments": [
{
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
386,
388
],
"loc": {
"start": {
"line": 10,
"column": 25
},
"end": {
"line": 10,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "last",
"range": [
389,
393
],
"loc": {
"start": {
"line": 10,
"column": 28
},
"end": {
"line": 10,
"column": 32
}
}
},
"range": [
386,
393
],
"loc": {
"start": {
"line": 10,
"column": 25
},
"end": {
"line": 10,
"column": 32
}
}
},
"arguments": [],
"range": [
386,
395
],
"loc": {
"start": {
"line": 10,
"column": 25
},
"end": {
"line": 10,
"column": 34
}
}
}
],
"range": [
369,
396
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 35
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
397,
401
],
"loc": {
"start": {
"line": 10,
"column": 36
},
"end": {
"line": 10,
"column": 40
}
}
},
"range": [
369,
401
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 40
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "expected",
"range": [
402,
410
],
"loc": {
"start": {
"line": 10,
"column": 41
},
"end": {
"line": 10,
"column": 49
}
}
}
],
"range": [
369,
411
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 50
}
}
},
"range": [
369,
412
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 51
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectSubscriptions",
"range": [
421,
440
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 27
}
}
},
"arguments": [
{
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
441,
443
],
"loc": {
"start": {
"line": 11,
"column": 28
},
"end": {
"line": 11,
"column": 30
}
}
},
"property": {
"type": "Identifier",
"name": "subscriptions",
"range": [
444,
457
],
"loc": {
"start": {
"line": 11,
"column": 31
},
"end": {
"line": 11,
"column": 44
}
}
},
"range": [
441,
457
],
"loc": {
"start": {
"line": 11,
"column": 28
},
"end": {
"line": 11,
"column": 44
}
}
}
],
"range": [
421,
458
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 45
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
459,
463
],
"loc": {
"start": {
"line": 11,
"column": 46
},
"end": {
"line": 11,
"column": 50
}
}
},
"range": [
421,
463
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 50
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "e1subs",
"range": [
464,
470
],
"loc": {
"start": {
"line": 11,
"column": 51
},
"end": {
"line": 11,
"column": 57
}
}
}
],
"range": [
421,
471
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 58
}
}
},
"range": [
421,
472
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 59
}
}
}
],
"range": [
236,
478
],
"loc": {
"start": {
"line": 6,
"column": 81
},
"end": {
"line": 12,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
224,
478
],
"loc": {
"start": {
"line": 6,
"column": 69
},
"end": {
"line": 12,
"column": 5
}
}
}
],
"range": [
159,
479
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 12,
"column": 6
}
}
},
"range": [
159,
480
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 12,
"column": 7
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
485,
487
],
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 6
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should error on nothing sent but completed",
"raw": "'should error on nothing sent but completed'",
"range": [
488,
532
],
"loc": {
"start": {
"line": 13,
"column": 7
},
"end": {
"line": 13,
"column": 51
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
560,
562
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
565,
568
],
"loc": {
"start": {
"line": 14,
"column": 17
},
"end": {
"line": 14,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--a--^----|",
"raw": "'--a--^----|'",
"range": [
569,
582
],
"loc": {
"start": {
"line": 14,
"column": 21
},
"end": {
"line": 14,
"column": 34
}
}
}
],
"range": [
565,
583
],
"loc": {
"start": {
"line": 14,
"column": 17
},
"end": {
"line": 14,
"column": 35
}
}
},
"range": [
560,
583
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 35
}
}
}
],
"kind": "var",
"range": [
556,
584
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 36
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1subs",
"range": [
597,
603
],
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 18
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
606,
614