diff --git a/test/built-ins/Temporal/Duration/prototype/total/total-value-infinity.js b/test/built-ins/Temporal/Duration/prototype/total/total-value-infinity.js new file mode 100644 index 0000000000..8e025aa189 --- /dev/null +++ b/test/built-ins/Temporal/Duration/prototype/total/total-value-infinity.js @@ -0,0 +1,12 @@ +// 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.total +description: Returns ±∞ when total is not representable as a Number value. +features: [Temporal] +---*/ + +const instance = new Temporal.Duration(0, 0, 0, 0, 0, 0, 0, 0, Number.MAX_VALUE, 0); + +assert.sameValue(instance.total('nanoseconds'), Infinity);