Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Proxy/deleteProperty/trap-is-undefined-not-strict.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 9.5.10
5 description: >
6 [[Delete]] (P)
7
8 8. If trap is undefined, then Return target.[[Delete]](P).
9 flags: [noStrict]
10 ---*/
11
12 var target = {
13 attr: 1
14 };
15 var p = new Proxy(target, {});
16
17 assert.sameValue(delete p.attr, true);
18 assert.sameValue(delete p.notThere, true);
19 assert.sameValue(
20 Object.getOwnPropertyDescriptor(target, "attr"),
21 undefined
22 );
23
24 Object.defineProperty(target, "attr", {
25 configurable: false,
26 enumerable: true,
27 value: 1
28 });
29
30 assert.sameValue(delete p.attr, false);