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);
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));
});