dirtybomb
Version:
A dirty bomb model
1,365 lines (1,364 loc) • 128 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"local": {
"type": "Identifier",
"name": "chai",
"range": [
48,
52
],
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 11
}
}
},
"range": [
48,
52
],
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 11
}
}
}
],
"source": {
"type": "Literal",
"value": "chai",
"raw": "'chai'",
"range": [
58,
64
],
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 23
}
}
},
"range": [
41,
65
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 24
}
},
"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": "Bomb",
"range": [
74,
78
],
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 11
}
}
},
"range": [
74,
78
],
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 11
}
}
}
],
"source": {
"type": "Literal",
"value": "../src/Bomb",
"raw": "'../src/Bomb'",
"range": [
84,
97
],
"loc": {
"start": {
"line": 6,
"column": 17
},
"end": {
"line": 6,
"column": 30
}
}
},
"range": [
67,
98
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 31
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "Literal",
"value": "use strict",
"raw": "\"use strict\"",
"range": [
100,
112
],
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 12
}
}
},
"range": [
100,
113
],
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 13
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "chai",
"range": [
115,
119
],
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 10,
"column": 4
}
}
},
"property": {
"type": "Identifier",
"name": "should",
"range": [
120,
126
],
"loc": {
"start": {
"line": 10,
"column": 5
},
"end": {
"line": 10,
"column": 11
}
}
},
"range": [
115,
126
],
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 10,
"column": 11
}
}
},
"arguments": [],
"range": [
115,
128
],
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 10,
"column": 13
}
}
},
"range": [
115,
129
],
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 10,
"column": 14
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
131,
139
],
"loc": {
"start": {
"line": 12,
"column": 0
},
"end": {
"line": 12,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Bomb",
"raw": "'Bomb'",
"range": [
140,
146
],
"loc": {
"start": {
"line": 12,
"column": 9
},
"end": {
"line": 12,
"column": 15
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "bomb",
"range": [
169,
173
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 12
}
}
},
"init": null,
"range": [
169,
173
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 12
}
}
}
],
"kind": "let",
"range": [
165,
174
],
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 13
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
184,
186
],
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 6
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should import correctly",
"raw": "'should import correctly'",
"range": [
187,
212
],
"loc": {
"start": {
"line": 15,
"column": 7
},
"end": {
"line": 15,
"column": 32
}
}
},
{
"type": "ArrowFunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "bomb",
"range": [
230,
234
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 12
}
}
},
"right": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Bomb",
"range": [
241,
245
],
"loc": {
"start": {
"line": 16,
"column": 19
},
"end": {
"line": 16,
"column": 23
}
}
},
"arguments": [
{
"type": "Literal",
"value": 22,
"raw": "22",
"range": [
246,
248
],
"loc": {
"start": {
"line": 16,
"column": 24
},
"end": {
"line": 16,
"column": 26
}
}
}
],
"range": [
237,
249
],
"loc": {
"start": {
"line": 16,
"column": 15
},
"end": {
"line": 16,
"column": 27
}
}
},
"range": [
230,
249
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 27
}
}
},
"range": [
230,
250
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 28
}
},
"trailingComments": [
{
"type": "Line",
"value": " Fat Man",
"range": [
251,
261
],
"loc": {
"start": {
"line": 16,
"column": 29
},
"end": {
"line": 16,
"column": 39
}
}
}
]
}
],
"range": [
220,
267
],
"loc": {
"start": {
"line": 15,
"column": 40
},
"end": {
"line": 17,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
214,
267
],
"loc": {
"start": {
"line": 15,
"column": 34
},
"end": {
"line": 17,
"column": 5
}
}
}
],
"range": [
184,
268
],
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 17,
"column": 6
}
},
"_esdocTestId": 9,
"_esdocTestName": "it9"
},
"range": [
184,
269
],
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 17,
"column": 7
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
275,
277
],
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 6
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should create all properties",
"raw": "'should create all properties'",
"range": [
278,
308
],
"loc": {
"start": {
"line": 19,
"column": 7
},
"end": {
"line": 19,
"column": 37
}
}
},
{
"type": "ArrowFunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"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": "bomb",
"range": [
326,
330
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "mass",
"range": [
331,
335
],
"loc": {
"start": {
"line": 20,
"column": 13
},
"end": {
"line": 20,
"column": 17
}
}
},
"range": [
326,
335
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 17
}
}
},
"property": {
"type": "Identifier",
"name": "should",
"range": [
336,
342
],
"loc": {
"start": {
"line": 20,
"column": 18
},
"end": {
"line": 20,
"column": 24
}
}
},
"range": [
326,
342
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 24
}
}
},
"property": {
"type": "Identifier",
"name": "be",
"range": [
343,
345
],
"loc": {
"start": {
"line": 20,
"column": 25
},
"end": {
"line": 20,
"column": 27
}
}
},
"range": [
326,
345
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "equal",
"range": [
346,
351
],
"loc": {
"start": {
"line": 20,
"column": 28
},
"end": {
"line": 20,
"column": 33
}
}
},
"range": [
326,
351
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 33
}
}
},
"arguments": [
{
"type": "Literal",
"value": 22,
"raw": "22",
"range": [
352,
354
],
"loc": {
"start": {
"line": 20,
"column": 34
},
"end": {
"line": 20,
"column": 36
}
}
}
],
"range": [
326,
355
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 37
}
}
},
"range": [
326,
356
],
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 38
}
}
},
{
"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": "bomb",
"range": [
365,
369
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "weaponYield",
"range": [
370,
381
],
"loc": {
"start": {
"line": 21,
"column": 13
},
"end": {
"line": 21,
"column": 24
}
}
},
"range": [
365,
381
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 24
}
}
},
"property": {
"type": "Identifier",
"name": "should",
"range": [
382,
388
],
"loc": {
"start": {
"line": 21,
"column": 25
},
"end": {
"line": 21,
"column": 31
}
}
},
"range": [
365,
388
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 31
}
}
},
"property": {
"type": "Identifier",
"name": "be",
"range": [
389,
391
],
"loc": {
"start": {
"line": 21,
"column": 32
},
"end": {
"line": 21,
"column": 34
}
}
},
"range": [
365,
391
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 34
}
}
},
"property": {
"type": "Identifier",
"name": "equal",
"range": [
392,
397
],
"loc": {
"start": {
"line": 21,
"column": 35
},
"end": {
"line": 21,
"column": 40
}
}
},
"range": [
365,
397
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 40
}
}
},
"arguments": [
{
"type": "BinaryExpression",
"operator": "/",
"left": {
"type": "Literal",
"value": 22,
"raw": "22",
"range": [
398,
400
],
"loc": {
"start": {
"line": 21,
"column": 41
},
"end": {
"line": 21,
"column": 43
}
}
},
"right": {
"type": "Literal",
"value": 1000000,
"raw": "1000000",
"range": [
403,
410
],
"loc": {
"start": {
"line": 21,
"column": 46
},
"end": {
"line": 21,
"column": 53
}
}
},
"range": [
398,
410
],
"loc": {
"start": {
"line": 21,
"column": 41
},
"end": {
"line": 21,
"column": 53
}
}
}
],
"range": [
365,
411
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 54
}
}
},
"range": [
365,
412
],
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 55
}
}
}
],
"range": [
316,
418
],
"loc": {
"start": {
"line": 19,
"column": 45
},
"end": {
"line": 22,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
310,
418
],
"loc": {
"start": {
"line": 19,
"column": 39
},
"end": {
"line": 22,
"column": 5
}
}
}
],
"range": [
275,
419
],
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 22,
"column": 6
}
},
"_esdocTestId": 10,
"_esdocTestName": "it10"
},
"range": [
275,
420
],
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 22,
"column": 7
}
},
"leadingComments": [
{
"type": "Line",
"value": " Fat Man",
"range": [
251,
261
],
"loc": {
"start": {
"line": 16,
"column": 29
},
"end": {
"line": 16,
"column": 39
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
430,
438
],
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 12
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Cloud Methods",
"raw": "'Cloud Methods'",
"range": [
439,
454
],
"loc": {
"start": {
"line": 24,
"column": 13
},
"end": {
"line": 24,
"column": 28
}
}
},
{
"type": "ArrowFunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
472,
474
],
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 25,
"column": 10
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should do cloud calculations",
"raw": "'should do cloud calculations'",
"range": [
475,
505
],
"loc": {
"start": {
"line": 25,
"column": 11
},
"end": {
"line": 25,
"column": 41
}
}
},
{
"type": "ArrowFunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"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": {