diff --git a/tests/generators/unittest_javascript.js b/tests/generators/unittest_javascript.js index 49c51b675f..a46666dda2 100644 --- a/tests/generators/unittest_javascript.js +++ b/tests/generators/unittest_javascript.js @@ -86,6 +86,8 @@ Blockly.JavaScript['unittest_main'].defineAssert_ = function(block) { ' function equals(a, b) {', ' if (a === b) {', ' return true;', + ' } else if ((typeof a == "number") && (typeof b == "number") && (a.toPrecision(15) == b.toPrecision(15))) {', + ' return true;', ' } else if (a instanceof Array && b instanceof Array) {', ' if (a.length != b.length) {', ' return false;',