tests/auto/qml/ecmascripttests/test262/test/language/expressions/delete/11.4.1-4-a-3-s.js
raw| 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-3-s |
| 6 | description: > |
| 7 | TypeError isn't thrown when deleting configurable data property |
| 8 | ---*/ |
| 9 | |
| 10 | var obj = {}; |
| 11 | Object.defineProperty(obj, "prop", { |
| 12 | value: "abc", |
| 13 | configurable: true |
| 14 | }); |
| 15 | |
| 16 | delete obj.prop; |
| 17 | |
| 18 | assert.sameValue(obj.hasOwnProperty("prop"), false, 'obj.hasOwnProperty("prop")'); |