This plugin for QUnit adds
assertion methods to test that a number is approximately equal (or not) to an expected number, within a given tolerance.
assert;assert;assertclose;// Alternatively:assert;assertnotClose;// Alternatively:assert;
maxDifference: the maximum inclusive difference allowed (tolerance) between the
minDifference: the minimum exclusive difference allowed (tolerance) between the
message: The usual
For more examples, refer to the unit tests.