15.2.3.6-4-30.js (517B)
1 // Copyright (c) 2012 Ecma International. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 es5id: 15.2.3.6-4-30 6 description: > 7 Object.defineProperty - 'name' is own accessor property without a 8 get function (8.12.9 step 1) 9 ---*/ 10 11 var obj = {}; 12 Object.defineProperty(obj, "foo", { 13 set: function() {}, 14 configurable: false 15 }); 16 assert.throws(TypeError, function() { 17 Object.defineProperty(obj, "foo", { 18 configurable: true 19 }); 20 }); 21 22 reportCompare(0, 0);