tor-browser

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

not-a-constructor.js (613B)


      1 // |reftest| skip-if(!Math.sumPrecise) -- Math.sumPrecise is not enabled unconditionally
      2 // Copyright (C) 2024 Kevin Gibbons. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-math.sumprecise
      7 description: Math.sumPrecise does not implement [[Construct]], is not new-able
      8 includes: [isConstructor.js]
      9 features: [Reflect.construct, Math.sumPrecise]
     10 ---*/
     11 
     12 assert.sameValue(isConstructor(Math.sumPrecise), false, "isConstructor(Math.sumPrecise) must return false");
     13 
     14 assert.throws(TypeError, function () {
     15  new Math.sumPrecise();
     16 });
     17 
     18 reportCompare(0, 0);