mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Add test for Temporal.Duration.prototype.total
This commit is contained in:
parent
b37d74191a
commit
f932f079b3
12
test/built-ins/Temporal/Duration/prototype/total/total-value-infinity.js
vendored
Normal file
12
test/built-ins/Temporal/Duration/prototype/total/total-value-infinity.js
vendored
Normal 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);
|
Loading…
x
Reference in New Issue
Block a user