dirtybomb
Version:
A dirty bomb model
1,232 lines (1,231 loc) • 204 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "Literal",
"value": "use strict",
"raw": "\"use strict\"",
"range": [
41,
53
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 12
}
}
},
"range": [
41,
54
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 13
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * Created by austin on 6/15/16.\n ",
"range": [
0,
40
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 3
}
}
}
]
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"local": {
"type": "Identifier",
"name": "chai",
"range": [
62,
66
],
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 11
}
}
},
"range": [
62,
66
],
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 11
}
}
}
],
"source": {
"type": "Literal",
"value": "chai",
"raw": "'chai'",
"range": [
72,
78
],
"loc": {
"start": {
"line": 5,
"column": 17
},
"end": {
"line": 5,
"column": 23
}
}
},
"range": [
55,
79
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 24
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"local": {
"type": "Identifier",
"name": "Atmosphere",
"range": [
87,
97
],
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 17
}
}
},
"range": [
87,
97
],
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 17
}
}
}
],
"source": {
"type": "Literal",
"value": "../src/Dispersion/Atmosphere",
"raw": "'../src/Dispersion/Atmosphere'",
"range": [
103,
133
],
"loc": {
"start": {
"line": 6,
"column": 23
},
"end": {
"line": 6,
"column": 53
}
}
},
"range": [
80,
134
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 54
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expect",
"range": [
142,
148
],
"loc": {
"start": {
"line": 8,
"column": 6
},
"end": {
"line": 8,
"column": 12
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "chai",
"range": [
151,
155
],
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 8,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "expect",
"range": [
156,
162
],
"loc": {
"start": {
"line": 8,
"column": 20
},
"end": {
"line": 8,
"column": 26
}
}
},
"range": [
151,
162
],
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 8,
"column": 26
}
}
},
"range": [
142,
162
],
"loc": {
"start": {
"line": 8,
"column": 6
},
"end": {
"line": 8,
"column": 26
}
}
}
],
"kind": "const",
"range": [
136,
163
],
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 27
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "chai",
"range": [
164,
168
],
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 4
}
}
},
"property": {
"type": "Identifier",
"name": "should",
"range": [
169,
175
],
"loc": {
"start": {
"line": 9,
"column": 5
},
"end": {
"line": 9,
"column": 11
}
}
},
"range": [
164,
175
],
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 11
}
}
},
"arguments": [],
"range": [
164,
177
],
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 13
}
}
},
"range": [
164,
178
],
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 14
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
180,
188
],
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 11,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Atmosphere",
"raw": "'Atmosphere'",
"range": [
189,
201
],
"loc": {
"start": {
"line": 11,
"column": 9
},
"end": {
"line": 11,
"column": 21
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "atm",
"range": [
224,
227
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 11
}
}
},
"init": null,
"range": [
224,
227
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 11
}
}
}
],
"kind": "let",
"range": [
220,
228
],
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 12
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
238,
246
],
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 12
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Constructor and setters",
"raw": "'Constructor and setters'",
"range": [
247,
272
],
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 14,
"column": 38
}
}
},
{
"type": "ArrowFunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
290,
292
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 10
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should take basic and optional parameters",
"raw": "'should take basic and optional parameters'",
"range": [
293,
336
],
"loc": {
"start": {
"line": 15,
"column": 11
},
"end": {
"line": 15,
"column": 54
}
}
},
{
"type": "ArrowFunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "atm",
"range": [
358,
361
],
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 15
}
}
},
"right": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Atmosphere",
"range": [
368,
378
],
"loc": {
"start": {
"line": 16,
"column": 22
},
"end": {
"line": 16,
"column": 32
}
}
},
"arguments": [
{
"type": "Literal",
"value": 5,
"raw": "5",
"range": [
379,
380
],
"loc": {
"start": {
"line": 16,
"column": 33
},
"end": {
"line": 16,
"column": 34
}
}
},
{
"type": "Literal",
"value": 0.5,
"raw": ".5",
"range": [
382,
384
],
"loc": {
"start": {
"line": 16,
"column": 36
},
"end": {
"line": 16,
"column": 38
}
}
},
{
"type": "Literal",
"value": 40,
"raw": "40",
"range": [
386,
388
],
"loc": {
"start": {
"line": 16,
"column": 40
},
"end": {
"line": 16,
"column": 42
}
}
},
{
"type": "Literal",
"value": 300,
"raw": "300",
"range": [
390,
393
],
"loc": {
"start": {
"line": 16,
"column": 44
},
"end": {
"line": 16,
"column": 47
}
}
},
{
"type": "Literal",
"value": "rural",
"raw": "'rural'",
"range": [
395,
402
],
"loc": {
"start": {
"line": 16,
"column": 49
},
"end": {
"line": 16,
"column": 56
}
}
},
{
"type": "Literal",
"value": true,
"raw": "true",
"range": [
404,
408
],
"loc": {
"start": {
"line": 16,
"column": 58
},
"end": {
"line": 16,
"column": 62
}
}
}
],
"range": [
364,
409
],
"loc": {
"start": {
"line": 16,
"column": 18
},
"end": {
"line": 16,
"column": 63
}
}
},
"range": [
358,
409
],
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 63
}
}
},
"range": [
358,
410
],
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 64
}
}
}
],
"range": [
344,
420
],
"loc": {
"start": {
"line": 15,
"column": 62
},
"end": {
"line": 17,
"column": 9
}
}
},
"generator": false,
"expression": false,
"range": [
338,
420
],
"loc": {
"start": {
"line": 15,
"column": 56
},
"end": {
"line": 17,
"column": 9
}
}
}
],
"range": [
290,
421
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 17,
"column": 10
}
},
"_esdocTestId": 2,
"_esdocTestName": "it2"
},
"range": [
290,
423
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 17,
"column": 12
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
441,
443
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 10
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should update wind with number",
"raw": "'should update wind with number'",
"range": [
444,
476
],
"loc": {
"start": {
"line": 19,
"column": 11
},
"end": {
"line": 19,
"column": 43
}
}
},
{
"type": "ArrowFunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "atm",
"range": [
498,
501
],
"loc": {
"start": {
"line": 20,
"column": 12
},
"end": {
"line": 20,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"name": "setWindSpeed",
"range": [
502,
514
],
"loc": {
"start": {
"line": 20,
"column": 16
},
"end": {
"line": 20,
"column": 28
}
}
},
"range": [
498,
514
],
"loc": {
"start": {
"line": 20,
"column": 12
},
"end": {
"line": 20,
"column": 28
}
}
},
"arguments": [
{
"type": "Literal",
"value": 3,
"raw": "3",
"range": [
515,
516
],
"loc": {
"start": {
"line": 20,
"column": 29
},
"end": {
"line": 20,
"column": 30
}
}
}
],
"range": [
498,
517
],
"loc": {
"start": {
"line": 20,
"column": 12
},
"end": {
"line": 20,
"column": 31
}
}
},
"range": [
498,
518
],
"loc": {
"start": {
"line": 20,
"column": 12
},
"end": {
"line": 20,
"column": 32
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "atm",
"range": [
531,
534
],
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"name": "windSpeed",
"range": [
535,
544
],
"loc": {
"start": {
"line": 21,
"column": 16
},
"end": {
"line": 21,
"column": 25
}
}
},
"range": [
531,
544
],
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 25
}
}
},
"property": {
"type": "Identifier",
"name": "should",
"range": [
545,
551
],
"loc": {
"start": {
"line": 21,
"column": 26
},
"end": {
"line": 21,
"column": 32
}
}
},
"range": [
531,
551
],
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 32
}
}
},
"property": {
"type": "Identifier",
"name": "be",
"range": [
552,
554
],
"loc": {
"start": {
"line": 21,
"column": 33
},
"end": {
"line": 21,
"column": 35
}
}
},
"range": [
531,
554
],
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 35
}
}
},
"property": {
"type": "Identifier",
"name": "equal",
"range": [
555,
560
],
"loc": {
"start": {
"line": 21,
"column": 36
},
"end": {
"line": 21,
"column": 41
}
}
},
"range": [
531,
560
],
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 41
}
}
},
"arguments": [
{
"type": "Literal",
"value": 3,
"raw": "3",
"range": [
561,
562
],
"loc": {
"start": {
"line": 21,
"column": 42
},
"end": {
"line": 21,
"column": 43
}
}
}
],
"range": [
531,
563
],
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {