tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

not-a-constructor.js (754B)


      1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
      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.plaindatetimeiso
      6 description: Temporal.Now.plainDateTimeISO does not implement [[Construct]]
      7 includes: [isConstructor.js]
      8 features: [Reflect.construct, Temporal, arrow-function]
      9 ---*/
     10 
     11 assert.sameValue(isConstructor(Temporal.Now.plainDateTimeISO), false, 'isConstructor(Temporal.Now.plainDateTimeISO) must return false');
     12 
     13 assert.throws(TypeError, () => {
     14  new Temporal.Now.plainDateTimeISO();
     15 }, 'new Temporal.Now.plainDateTimeISO() throws a TypeError exception');
     16 
     17 reportCompare(0, 0);