diff --git a/harness/compareArray.js b/harness/compareArray.js index 0e0654aeb4..228a6aaaec 100644 --- a/harness/compareArray.js +++ b/harness/compareArray.js @@ -14,16 +14,6 @@ function compareArray(a, b) { } assert.compareArray = function(actual, expected, message) { - if (compareArray(actual, expected)) return; - - - if (message === undefined) { - message = ''; - } else { - message += ' '; - } - - message += 'Expected SameValue(«' + String(actual) + '», «' + String(expected) + '») to be true'; - - $ERROR(`${message}${message === undefined ? '' : ' '}Expected the arrays [${actual}] to have the same contents as [${expected}]`); + assert(compareArray(actual, expected), + `Expected [${actual.join(", ")}] and [${expected.join(", ")}] to have the same contents. ${message}`); }