diff --git a/lib/assert/macros.js b/lib/assert/macros.js index b91449d..494ad6d 100644 --- a/lib/assert/macros.js +++ b/lib/assert/macros.js @@ -70,7 +70,7 @@ assert.lesser = function (actual, expected, message) { assert.inDelta = function (actual, expected, delta, message) { var lower = expected - delta; var upper = expected + delta; - if (actual < lower || actual > upper) { + if (actual != +actual || actual < lower || actual > upper) { assert.fail(actual, expected, message || "expected {actual} to be in within *" + delta.toString() + "* of {expected}", null, assert.inDelta); } };