lint fixes

This commit is contained in:
Olivier Gagnon
2022-05-25 15:08:48 -04:00
parent 76ccb0ba36
commit c1650e332b
12 changed files with 95 additions and 66 deletions

View File

@@ -18,6 +18,11 @@ const CorpCost = 1024 - ScriptBaseCost;
describe("Parsing NetScript code to work out static RAM costs", function () {
// Tests numeric equality, allowing for floating point imprecision - and includes script base cost
/**
*
* @param {number} val
* @param {number} expected
*/
function expectCost(val, expected) {
const expectedWithBase = expected + ScriptBaseCost;
expect(val).toBeGreaterThanOrEqual(expectedWithBase - 100 * Number.EPSILON);