mirror of
https://github.com/tc39/test262.git
synced 2025-08-18 00:18:26 +02:00
21 lines
861 B
JavaScript
21 lines
861 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: >
|
|
TypeError thrown if input is of wrong primitive type.
|
|
info: |
|
|
Temporal.Instant.fromEpochNanoseconds ( epochNanoseconds )
|
|
|
|
1. Set epochNanoseconds to ? ToBigInt(epochNanoseconds).
|
|
...
|
|
features: [Temporal]
|
|
---*/
|
|
|
|
assert.throws(TypeError, () => Temporal.Instant.fromEpochNanoseconds(), "undefined");
|
|
assert.throws(TypeError, () => Temporal.Instant.fromEpochNanoseconds(undefined), "undefined");
|
|
assert.throws(TypeError, () => Temporal.Instant.fromEpochNanoseconds(null), "null");
|
|
assert.throws(TypeError, () => Temporal.Instant.fromEpochNanoseconds(42), "number");
|
|
assert.throws(TypeError, () => Temporal.Instant.fromEpochNanoseconds(Symbol()), "symbol");
|