We're using Chai's BDD API to write unit tests.
How can we assert floating point equality?
For example, if I try to make this assertion to check for a 66⅔% return value:
expect(percentage).to.equal(2 / 3 * 100.0);
I get this failure:
AssertionError: expected 66.66666666666667 to equal 66.66666666666666
Expected :66.66666666666666
Actual :66.66666666666667