Add test for Temporal.Duration.prototype.total

This commit is contained in:
Aditi 2022-08-01 16:40:11 +05:30 committed by Philip Chimento
parent b37d74191a
commit f932f079b3
1 changed files with 12 additions and 0 deletions

View File

@ -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);