Open skeggse opened 10 years ago
Expect.js currently does not support ensuring a floating point number approximates another number within a certain accuracy. Proposed usage:
expect(0.99999).to.approximate(0.99998, 4); // works expect(0.99999).to.approximate(0.99998, 5); // fails expect(0.999999).to.approximate(0.999998, 5); // works expect(0.999999).to.approximate(0.999998, 6); // fails
Expect.js currently does not support ensuring a floating point number approximates another number within a certain accuracy. Proposed usage: