Remove usage of rest and default parameters in harness (#3034)

Also see https://github.com/tc39/test262/issues/3032
This commit is contained in:
Paul Bakker 2021-07-02 15:04:13 +02:00 committed by GitHub
parent c27f6a5b9a
commit a6a895db12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -30,7 +30,8 @@ compareArray.format = function(array) {
return `[${array.map(String).join(', ')}]`;
};
assert.compareArray = function(actual, expected, message = '') {
assert.compareArray = function(actual, expected, message) {
message = message === undefined ? '' : message;
assert(actual != null, `First argument shouldn't be nullish. ${message}`);
assert(expected != null, `Second argument shouldn't be nullish. ${message}`);
var format = compareArray.format;

View File

@ -18,8 +18,8 @@ Test262Error.prototype.toString = function () {
return "Test262Error: " + this.message;
};
Test262Error.thrower = (...args) => {
throw new Test262Error(...args);
Test262Error.thrower = (message) => {
throw new Test262Error(message);
};
var $ERROR = Test262Error.thrower;