Fix up compareArray

This commit is contained in:
Daniel Ehrenberg 2017-04-26 14:05:31 +02:00 committed by Leo Balter
parent 6ee183a057
commit abac4e0b19
No known key found for this signature in database
GPG Key ID: 2C75F319D398E36B
1 changed files with 2 additions and 12 deletions

View File

@ -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}`);
}