tor-browser

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

11.4.1-4.a-8-s-strict.js (695B)


      1 'use strict';
      2 // Copyright (c) 2012 Ecma International.  All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 info: |
      7    This test is actually testing the [[Delete]] internal method (8.12.8). Since the
      8    language provides no way to directly exercise [[Delete]], the tests are placed here.
      9 esid: sec-delete-operator-runtime-semantics-evaluation
     10 description: >
     11    delete operator throws TypeError when deleting a non-configurable
     12    data property in strict mode
     13 flags: [onlyStrict]
     14 ---*/
     15 
     16 var global = this;
     17 // NaN (15.1.1.1) has [[Configurable]] set to false.
     18 assert.throws(TypeError, function() {
     19  delete global.NaN;
     20 });
     21 
     22 reportCompare(0, 0);