I maintain a set of finance calculators for India. Every formula ships with a unit test, and the
build fails if a number drifts more than 0.5% from a verified value. That sounds like overkill for
arithmetic until you find out how much published finance code is quietly wrong.
Here are three errors I keep running into, with the actual figures. All three are asserted by tests
in — MIT, zero dependencies, 20 tests
Run the suite with npm test — plain node --test, no framework. The three traps above are in
there deliberately, so a regression that reintroduces one fails loudly.
If you have hit a fourth one, I would genuinely like to hear it.
SOCIAL SHARE CARD GENERATOR