Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions harness/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ assert.compareArray = function (actual, expected, message) {
}

if (isPrimitive(actual)) {
assert(false, `Actual argument [${actual}] shouldn't be primitive. ${message}`);
assert(false, "Actual argument [" + actual + "] shouldn't be primitive. " + String(message));
} else if (isPrimitive(expected)) {
assert(false, `Expected argument [${expected}] shouldn't be primitive. ${message}`);
assert(false, "Expected argument [" + expected + "] shouldn't be primitive. " + String(message));
}
var result = compareArray(actual, expected);
if (result) return;

var format = compareArray.format;
assert(false, `Actual ${format(actual)} and expected ${format(expected)} should have the same contents. ${message}`);
assert(false, "Actual " + format(actual) + " and expected " + format(expected) + " should have the same contents. " + String(message));
};

function compareArray(a, b) {
Expand All @@ -137,15 +137,15 @@ function compareArray(a, b) {
}

compareArray.format = function (arrayLike) {
return `[${Array.prototype.map.call(arrayLike, String).join(', ')}]`;
return "[" + Array.prototype.map.call(arrayLike, String).join(", ") + "]";
};

assert._formatIdentityFreeValue = function formatIdentityFreeValue(value) {
switch (value === null ? 'null' : typeof value) {
case 'string':
return typeof JSON !== "undefined" ? JSON.stringify(value) : `"${value}"`;
return typeof JSON !== "undefined" ? JSON.stringify(value) : '"' + value + '"';
case 'bigint':
return `${value}n`;
return String(value) + "n";
case 'number':
if (value === 0 && 1 / value === -Infinity) return '-0';
// falls through
Expand Down
2 changes: 1 addition & 1 deletion harness/propertyHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function verifyProperty(obj, name, desc, options) {
names[i] === "configurable" ||
names[i] === "get" ||
names[i] === "set",
"Invalid descriptor field: " + names[i],
"Invalid descriptor field: " + names[i]
);
}

Expand Down
Loading