Remove unnecessary call to compareArray in this-value-boolean.js

This assertion throws before `compareArray` is called. In addition, `compareArray` takes two parameters, not one.

It's unclear to me why it was added in the first place.
This commit is contained in:
Trevor Florence 2025-09-10 09:38:11 -06:00 committed by Philip Chimento
parent 3fd4ec27f1
commit a5e69a1534

View File

@ -32,8 +32,8 @@ delete Boolean.prototype.length;
Boolean.prototype[0] = "monkeys"; Boolean.prototype[0] = "monkeys";
Boolean.prototype[2] = "bogus"; Boolean.prototype[2] = "bogus";
assert.throws(RangeError, assert.throws(RangeError,
() => compareArray(Array.prototype.with.call(true, 0, 2)), () => Array.prototype.with.call(true, 0, 2),
"Array.prototype.with on object with undefined length"); "Array.prototype.with on object with undefined length");
assert.throws(RangeError, assert.throws(RangeError,
() => compareArray(Array.prototype.with.call(false, 0, 2)), () => Array.prototype.with.call(false, 0, 2),
"Array.prototype.with on object with undefined length"); "Array.prototype.with on object with undefined length");