11.4.1-4-a-1-s-strict.js (564B)
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 esid: sec-delete-operator-runtime-semantics-evaluation 7 description: > 8 Strict Mode - TypeError is thrown when deleting non-configurable 9 data property 10 flags: [onlyStrict] 11 ---*/ 12 13 var obj = {}; 14 Object.defineProperty(obj, 'prop', { 15 value: 'abc', 16 configurable: false, 17 }); 18 assert.throws(TypeError, function() { 19 delete obj.prop; 20 }); 21 assert.sameValue(obj.prop, 'abc', 'obj.prop'); 22 23 reportCompare(0, 0);