mirror of
https://github.com/tc39/test262.git
synced 2025-08-18 16:38:32 +02:00
21 lines
682 B
JavaScript
21 lines
682 B
JavaScript
// Copyright (C) 2024 André Bargull. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
esid: sec-temporal.instant.fromepochnanoseconds
|
|
description: >
|
|
Throws a RangeError if the input is not a valid epoch nanoseconds value.
|
|
info: |
|
|
Temporal.Instant.fromEpochNanoseconds ( epochNanoseconds )
|
|
|
|
...
|
|
2. If IsValidEpochNanoseconds(epochNanoseconds) is false, throw a RangeError exception.
|
|
...
|
|
features: [Temporal]
|
|
---*/
|
|
|
|
var limit = 8640000000000000000000n;
|
|
|
|
assert.throws(RangeError, () => Temporal.Instant.fromEpochNanoseconds(-limit - 1n));
|
|
assert.throws(RangeError, () => Temporal.Instant.fromEpochNanoseconds(limit + 1n));
|