Debian Codegraph @

js/src/tests/test262/built-ins/Temporal/Now/zonedDateTimeISO/not-a-constructor.js

raw
1 // |reftest| shell-option(--enable-temporal) skip-if(!this.hasOwnProperty('Temporal')||!xulRuntime.shell) -- Temporal is not enabled unconditionally, requires shell-options
2 // Copyright (C) 2021 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 esid: sec-temporal.now.zoneddatetimeiso
6 description: Temporal.Now.zonedDateTimeISO does not implement [[Construct]]
7 includes: [isConstructor.js]
8 features: [Reflect.construct, Temporal, arrow-function]
9 ---*/
10
11 assert.sameValue(isConstructor(Temporal.Now.zonedDateTimeISO), false, 'isConstructor(Temporal.Now.zonedDateTimeISO) must return false');
12
13 assert.throws(TypeError, () => {
14 new Temporal.Now.zonedDateTimeISO();
15 }, 'new Temporal.Now.zonedDateTimeISO() throws a TypeError exception');
16
17 reportCompare(0, 0);