]> git.scottworley.com Git - inverse-tax/blobdiff - tax.test.js
Nevermind about near
[inverse-tax] / tax.test.js
index 192eac0cbf9c4edf142fc4acc2b99c65fd2feb31..6fcc15c74dbc39ad806c7c3961b495360ed7edf1 100644 (file)
@@ -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));
 });