| 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: 11.4.1-4-a-2-s |
| 6 |
description: > |
| 7 |
Strict Mode - TypeError is thrown when deleting non-configurable |
| 8 |
accessor property |
| 9 |
flags: [onlyStrict] |
| 10 |
---*/ |
| 11 |
|
| 12 |
var obj = {}; |
| 13 |
Object.defineProperty(obj, "prop", { |
| 14 |
get: function () { |
| 15 |
return "abc"; |
| 16 |
}, |
| 17 |
configurable: false |
| 18 |
}); |
| 19 |
assert.throws(TypeError, function() { |
| 20 |
delete obj.prop; |
| 21 |
}); |
| 22 |
assert.sameValue(obj.prop, "abc", 'obj.prop'); |