mirror of
https://github.com/tc39/test262.git
synced 2025-07-26 07:25:15 +02:00
Remove usage of rest and default parameters in harness (#3034)
Also see https://github.com/tc39/test262/issues/3032
This commit is contained in:
parent
c27f6a5b9a
commit
a6a895db12
@ -30,7 +30,8 @@ compareArray.format = function(array) {
|
|||||||
return `[${array.map(String).join(', ')}]`;
|
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(actual != null, `First argument shouldn't be nullish. ${message}`);
|
||||||
assert(expected != null, `Second argument shouldn't be nullish. ${message}`);
|
assert(expected != null, `Second argument shouldn't be nullish. ${message}`);
|
||||||
var format = compareArray.format;
|
var format = compareArray.format;
|
||||||
|
@ -18,8 +18,8 @@ Test262Error.prototype.toString = function () {
|
|||||||
return "Test262Error: " + this.message;
|
return "Test262Error: " + this.message;
|
||||||
};
|
};
|
||||||
|
|
||||||
Test262Error.thrower = (...args) => {
|
Test262Error.thrower = (message) => {
|
||||||
throw new Test262Error(...args);
|
throw new Test262Error(message);
|
||||||
};
|
};
|
||||||
|
|
||||||
var $ERROR = Test262Error.thrower;
|
var $ERROR = Test262Error.thrower;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user