X-Git-Url: http://git.scottworley.com/inverse-tax/blobdiff_plain/9d36e0c2b4cc8229b588b751a04e8119f54034b7..5789fd4b97bc2bb94caa7b6ae288f649f432bdc3:/tax.test.js diff --git a/tax.test.js b/tax.test.js index 192eac0..6fcc15c 100644 --- a/tax.test.js +++ b/tax.test.js @@ -6,10 +6,6 @@ function test(description, f) { f(); } -function near(a, b, epsilon = 1e-6) { - return Math.abs(a - b) < epsilon; -} - test("parse tax table", () => { const parsed = parse_tax_table(' 1 2\n10 4\n'); assert.strictEqual(parsed.length, 2); @@ -25,5 +21,4 @@ test("sum", () => { test("tax", () => { assert.strictEqual(tax([[10, 100, .01], [100, Infinity, .1]], 150), 5.9); - assert.ok(near(tax([[10, 100, .01], [100, Infinity, .1]], 150), 5.9)); });