blob: d490b2508d312799cabf052b4b94d0c3512592eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
Close-Enough - A QUnit Addon For Number Approximations
================================
This addon for QUnit adds close and notClose assertion methods, to test that
numbers are close enough (or different enough) from an expected number, with
a specified accuracy.
Usage:
close(actual, expected, maxDifference, message)
notClose(actual, expected, minDifference, message)
Where:
* maxDifference: the maximum inclusive difference allowed between the actual and expected numbers
* minDifference: the minimum exclusive difference allowed between the actual and expected numbers
* actual, expected, message: The usual
|