1 // Copyright (C) 2021 Igalia, S.L. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
5 esid: sec-array.prototype.with
7 Array.prototype.with throws if the receiver is null or undefined
9 Array.prototype.with ( index, value )
11 1. Let O be ? ToObject(this value).
13 features: [change-array-by-copy]
16 assert.throws(TypeError, () => {
17 Array.prototype.with.call(null, 0, 0);
20 assert.throws(TypeError, () => {
21 Array.prototype.with.call(undefined, 0, 0);