diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Temporal/Instant/constructor.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Temporal/Instant/constructor.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Temporal/Instant/constructor.js b/js/src/tests/test262/built-ins/Temporal/Instant/constructor.js new file mode 100644 index 0000000000..e7ddc05c37 --- /dev/null +++ b/js/src/tests/test262/built-ins/Temporal/Instant/constructor.js @@ -0,0 +1,15 @@ +// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally +// Copyright (C) 2021 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-temporal.instant +description: Temporal.Instant constructor cannot be called as a function +info: | + 1. If NewTarget is undefined, throw a TypeError exception. +features: [Temporal] +---*/ + +assert.throws(TypeError, () => Temporal.Instant(0n)); + +reportCompare(0, 0); |