Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/delete/11.4.1-4-a-1-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-1-s
6 description: >
7 Strict Mode - TypeError is thrown when deleting non-configurable
8 data property
9 flags: [onlyStrict]
10 ---*/
11
12 var obj = {};
13 Object.defineProperty(obj, "prop", {
14 value: "abc",
15 configurable: false
16 });
17 assert.throws(TypeError, function() {
18 delete obj.prop;
19 });
20 assert.sameValue(obj.prop, "abc", 'obj.prop');