tor-browser

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

constructor-property.js (952B)


      1 // Copyright (C) 2014 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 14.5
      5 description: >
      6    class constructor property
      7 ---*/
      8 class C {}
      9 assert.sameValue(
     10    C,
     11    C.prototype.constructor,
     12    "The value of `C` is `C.prototype.constructor`"
     13 );
     14 var desc = Object.getOwnPropertyDescriptor(C.prototype, 'constructor');
     15 assert.sameValue(desc.configurable, true, "The value of `desc.configurable` is `true`, after executing `var desc = Object.getOwnPropertyDescriptor(C.prototype, 'constructor');`");
     16 assert.sameValue(desc.enumerable, false, "The value of `desc.enumerable` is `false`, after executing `var desc = Object.getOwnPropertyDescriptor(C.prototype, 'constructor');`");
     17 assert.sameValue(desc.writable, true, "The value of `desc.writable` is `true`, after executing `var desc = Object.getOwnPropertyDescriptor(C.prototype, 'constructor');`");
     18 
     19 reportCompare(0, 0);