1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2024 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
6 esid: sec-temporal.duration.prototype.round
8 When converting the result from normalized duration form, each duration
9 component is turned into a float64-representable integer
13 const d = new Temporal.Duration(0, 0, 0, 0, 0, 0, /* s = */ Number.MAX_SAFE_INTEGER, 0, 0, /* ns = */ 999_999_999);
14 assert.throws(RangeError, () => d.round({
15 largestUnit: "nanoseconds",
17 }), "nanoseconds component after balancing as a float64-representable integer is out of range");