mirror of
https://github.com/tc39/test262.git
synced 2025-07-31 01:44:54 +02:00
22 lines
474 B
JavaScript
22 lines
474 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
|
|
description: >
|
|
Throws a RangeError if the input is far away from the epoch nanoseconds limits.
|
|
features: [Temporal]
|
|
---*/
|
|
|
|
assert.throws(
|
|
RangeError,
|
|
() => new Temporal.Instant(2n ** 128n),
|
|
"2n ** 128n"
|
|
);
|
|
|
|
assert.throws(
|
|
RangeError,
|
|
() => new Temporal.Instant(-(2n ** 128n)),
|
|
"-(2n ** 128n)"
|
|
);
|