// Copyright (C) 2021 the V8 project authors. All rights reserved.
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.duration.prototype.with
description: Singular properties in the property bag are always ignored
features: [Temporal]
---*/
const instance = new Temporal.Duration(0, 0, 0, 1, 2, 3, 4, 987, 654, 321);
[
{ year: 1 },
{ month: 2 },
{ week: 3 },
{ day: 4 },
{ hour: 5 },
{ minute: 6 },
{ second: 7 },
{ millisecond: 8 },
{ microsecond: 9 },
{ nanosecond: 10 },
].forEach((badObject) => {
assert.throws(TypeError, () => instance.with(badObject),
"Throw TypeError if temporalDurationLike is not valid");
});