UNPKG

dirtybomb

Version:
1,296 lines (1,295 loc) 82.4 kB
{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 40, 52 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 12 } } }, "range": [ 40, 53 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 13 } }, "leadingComments": [ { "type": "Block", "value": "*\n * Created by austin on 6/8/16.\n ", "range": [ 0, 39 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 3, "column": 3 } } } ] }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "integrate", "range": [ 62, 71 ], "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 17 } } }, "imported": { "type": "Identifier", "name": "integrate", "range": [ 62, 71 ], "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 17 } } }, "range": [ 62, 71 ], "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 17 } } } ], "source": { "type": "Literal", "value": "../src/Dispersion/utils", "raw": "'../src/Dispersion/utils'", "range": [ 78, 103 ], "loc": { "start": { "line": 5, "column": 24 }, "end": { "line": 5, "column": 49 } } }, "range": [ 54, 104 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 50 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportDefaultSpecifier", "local": { "type": "Identifier", "name": "chai", "range": [ 112, 116 ], "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 11 } } }, "range": [ 112, 116 ], "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 11 } } } ], "source": { "type": "Literal", "value": "chai", "raw": "'chai'", "range": [ 122, 128 ], "loc": { "start": { "line": 6, "column": 17 }, "end": { "line": 6, "column": 23 } } }, "range": [ 105, 129 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 24 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "chai", "range": [ 131, 135 ], "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 4 } } }, "property": { "type": "Identifier", "name": "should", "range": [ 136, 142 ], "loc": { "start": { "line": 8, "column": 5 }, "end": { "line": 8, "column": 11 } } }, "range": [ 131, 142 ], "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 11 } } }, "arguments": [], "range": [ 131, 144 ], "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 13 } } }, "range": [ 131, 145 ], "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 14 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 147, 155 ], "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 10, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Integrate", "raw": "'Integrate'", "range": [ 156, 167 ], "loc": { "start": { "line": 10, "column": 9 }, "end": { "line": 10, "column": 20 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 186, 188 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "accurate within 1/1000 for simple functions", "raw": "'accurate within 1/1000 for simple functions'", "range": [ 189, 234 ], "loc": { "start": { "line": 11, "column": 7 }, "end": { "line": 11, "column": 52 } } }, { "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": "CallExpression", "callee": { "type": "Identifier", "name": "integrate", "range": [ 252, 261 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 17 } } }, "arguments": [ { "type": "Literal", "value": 0, "raw": "0", "range": [ 262, 263 ], "loc": { "start": { "line": 12, "column": 18 }, "end": { "line": 12, "column": 19 } } }, { "type": "Literal", "value": 1, "raw": "1", "range": [ 265, 266 ], "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 22 } } }, { "type": "ArrowFunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "Literal", "value": 1, "raw": "1", "range": [ 283, 284 ], "loc": { "start": { "line": 12, "column": 39 }, "end": { "line": 12, "column": 40 } } }, "range": [ 276, 285 ], "loc": { "start": { "line": 12, "column": 32 }, "end": { "line": 12, "column": 41 } } } ], "range": [ 274, 287 ], "loc": { "start": { "line": 12, "column": 30 }, "end": { "line": 12, "column": 43 } } }, "generator": false, "expression": false, "range": [ 268, 287 ], "loc": { "start": { "line": 12, "column": 24 }, "end": { "line": 12, "column": 43 } } } ], "range": [ 252, 288 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 44 } } }, "property": { "type": "Identifier", "name": "should", "range": [ 289, 295 ], "loc": { "start": { "line": 12, "column": 45 }, "end": { "line": 12, "column": 51 } } }, "range": [ 252, 295 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 51 } } }, "property": { "type": "Identifier", "name": "be", "range": [ 296, 298 ], "loc": { "start": { "line": 12, "column": 52 }, "end": { "line": 12, "column": 54 } } }, "range": [ 252, 298 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 54 } } }, "property": { "type": "Identifier", "name": "closeTo", "range": [ 299, 306 ], "loc": { "start": { "line": 12, "column": 55 }, "end": { "line": 12, "column": 62 } } }, "range": [ 252, 306 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 62 } } }, "arguments": [ { "type": "Literal", "value": 1, "raw": "1", "range": [ 307, 308 ], "loc": { "start": { "line": 12, "column": 63 }, "end": { "line": 12, "column": 64 } } }, { "type": "Literal", "value": 0.001, "raw": "0.001", "range": [ 310, 315 ], "loc": { "start": { "line": 12, "column": 66 }, "end": { "line": 12, "column": 71 } } } ], "range": [ 252, 316 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 72 } } }, "range": [ 252, 317 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 73 } } } ], "range": [ 242, 323 ], "loc": { "start": { "line": 11, "column": 60 }, "end": { "line": 13, "column": 5 } } }, "generator": false, "expression": false, "range": [ 236, 323 ], "loc": { "start": { "line": 11, "column": 54 }, "end": { "line": 13, "column": 5 } } } ], "range": [ 186, 324 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 13, "column": 6 } }, "_esdocTestId": 59, "_esdocTestName": "it59" }, "range": [ 186, 325 ], "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 13, "column": 7 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 335, 337 ], "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 6 } } }, "arguments": [ { "type": "Literal", "value": "can take functions with arguments", "raw": "'can take functions with arguments'", "range": [ 338, 373 ], "loc": { "start": { "line": 15, "column": 7 }, "end": { "line": 15, "column": 42 } } }, { "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": "CallExpression", "callee": { "type": "Identifier", "name": "integrate", "range": [ 390, 399 ], "loc": { "start": { "line": 16, "column": 7 }, "end": { "line": 16, "column": 16 } } }, "arguments": [ { "type": "Literal", "value": 0, "raw": "0", "range": [ 400, 401 ], "loc": { "start": { "line": 16, "column": 17 }, "end": { "line": 16, "column": 18 } } }, { "type": "Literal", "value": 1, "raw": "1", "range": [ 403, 404 ], "loc": { "start": { "line": 16, "column": 20 }, "end": { "line": 16, "column": 21 } } }, { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 407, 408 ], "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 25 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "x", "range": [ 422, 423 ], "loc": { "start": { "line": 16, "column": 39 }, "end": { "line": 16, "column": 40 } } }, "range": [ 415, 424 ], "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 41 } } } ], "range": [ 413, 426 ], "loc": { "start": { "line": 16, "column": 30 }, "end": { "line": 16, "column": 43 } } }, "generator": false, "expression": false, "range": [ 406, 426 ], "loc": { "start": { "line": 16, "column": 23 }, "end": { "line": 16, "column": 43 } } } ], "range": [ 390, 427 ], "loc": { "start": { "line": 16, "column": 7 }, "end": { "line": 16, "column": 44 } } }, "property": { "type": "Identifier", "name": "should", "range": [ 428, 434 ], "loc": { "start": { "line": 16, "column": 45 }, "end": { "line": 16, "column": 51 } } }, "range": [ 390, 434 ], "loc": { "start": { "line": 16, "column": 7 }, "end": { "line": 16, "column": 51 } } }, "property": { "type": "Identifier", "name": "be", "range": [ 435, 437 ], "loc": { "start": { "line": 16, "column": 52 }, "end": { "line": 16, "column": 54 } } }, "range": [ 390, 437 ], "loc": { "start": { "line": 16, "column": 7 }, "end": { "line": 16, "column": 54 } } }, "property": { "type": "Identifier", "name": "closeTo", "range": [ 438, 445 ], "loc": { "start": { "line": 16, "column": 55 }, "end": { "line": 16, "column": 62 } } }, "range": [ 390, 445 ], "loc": { "start": { "line": 16, "column": 7 }, "end": { "line": 16, "column": 62 } } }, "arguments": [ { "type": "Literal", "value": 0.5, "raw": "0.5", "range": [ 446, 449 ], "loc": { "start": { "line": 16, "column": 63 }, "end": { "line": 16, "column": 66 } } }, { "type": "Literal", "value": 0.001, "raw": "0.001", "range": [ 451, 456 ], "loc": { "start": { "line": 16, "column": 68 }, "end": { "line": 16, "column": 73 } } } ], "range": [ 390, 457 ], "loc": { "start": { "line": 16, "column": 7 }, "end": { "line": 16, "column": 74 } } }, "range": [ 390, 458 ], "loc": { "start": { "line": 16, "column": 7 }, "end": { "line": 16, "column": 75 } } } ], "range": [ 381, 465 ], "loc": { "start": { "line": 15, "column": 50 }, "end": { "line": 17, "column": 5 } } }, "generator": false, "expression": false, "range": [ 375, 465 ], "loc": { "start": { "line": 15, "column": 44 }, "end": { "line": 17, "column": 5 } } } ], "range": [ 335, 466 ], "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 17, "column": 6 } }, "_esdocTestId": 60, "_esdocTestName": "it60" }, "range": [ 335, 467 ], "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 17, "column": 7 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 473, 475 ], "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 6 }