tor-browser

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

target-is-not-object-throws.js (726B)


      1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 26.1.4
      5 description: >
      6  Throws a TypeError if target is not an Object.
      7 info: |
      8  26.1.4 Reflect.deleteProperty ( target, propertyKey )
      9 
     10  1. If Type(target) is not Object, throw a TypeError exception.
     11  ...
     12 features: [Reflect]
     13 ---*/
     14 
     15 assert.throws(TypeError, function() {
     16  Reflect.deleteProperty(1, 'p');
     17 });
     18 
     19 assert.throws(TypeError, function() {
     20  Reflect.deleteProperty(null, 'p');
     21 });
     22 
     23 assert.throws(TypeError, function() {
     24  Reflect.deleteProperty(undefined, 'p');
     25 });
     26 
     27 assert.throws(TypeError, function() {
     28  Reflect.deleteProperty('', 'p');
     29 });
     30 
     31 reportCompare(0, 0);