diff --git a/test/built-ins/Temporal/Duration/prototype/with/argument-invalid-property.js b/test/built-ins/Temporal/Duration/prototype/with/argument-invalid-property.js index 9b39e2bcca..271b5687e5 100644 --- a/test/built-ins/Temporal/Duration/prototype/with/argument-invalid-property.js +++ b/test/built-ins/Temporal/Duration/prototype/with/argument-invalid-property.js @@ -15,6 +15,18 @@ assert.throws( "Throws TypeError if no property is present" ); +assert.throws( + TypeError, + () => instance.with([]), + "Throws TypeError if no property is present (with array)" +); + +assert.throws( + TypeError, + () => instance.with(() => {}), + "Throws TypeError if no property is present (with function)" +); + assert.throws( TypeError, () => instance.with({ nonsense: true }), diff --git a/test/built-ins/Temporal/Duration/prototype/with/argument-not-object.js b/test/built-ins/Temporal/Duration/prototype/with/argument-not-object.js index 3af6bbeb5c..cdf2a3f26a 100644 --- a/test/built-ins/Temporal/Duration/prototype/with/argument-not-object.js +++ b/test/built-ins/Temporal/Duration/prototype/with/argument-not-object.js @@ -15,6 +15,4 @@ assert.throws(TypeError, () => instance.with(""), "empty string"); assert.throws(TypeError, () => instance.with(Symbol()), "Symbol"); assert.throws(TypeError, () => instance.with(7), "number"); assert.throws(TypeError, () => instance.with(7n), "bigint"); -assert.throws(TypeError, () => instance.with([]), "array"); -assert.throws(TypeError, () => instance.with(() => {}), "function"); assert.throws(TypeError, () => instance.with("string"), "string");