···11+// Copyright (C) 2025 Igalia, S.L. All rights reserved.
22+// This code is governed by the BSD license found in the LICENSE file.
33+44+/*---
55+esid: sec-temporal.duration.prototype.total
66+description: Totaling zero duration returns 0
77+features: [Temporal]
88+---*/
99+1010+const zero = new Temporal.Duration();
1111+1212+let relativeToDates = [
1313+ new Temporal.ZonedDateTime(0n, 'UTC'),
1414+ new Temporal.PlainDateTime(1970, 1, 1)
1515+];
1616+1717+let units = [ 'days', 'weeks', 'months', 'years' ];
1818+1919+for (const relativeTo of relativeToDates) {
2020+ for (const unit of units) {
2121+ assert.sameValue(zero.total({ unit, relativeTo }), 0);
2222+ }
2323+}