Update proxy to ES2020 (#4085)
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
This commit is contained in:
@@ -162,3 +162,21 @@ try {
|
||||
} catch (e) {
|
||||
assert(e instanceof TypeError);
|
||||
}
|
||||
|
||||
var trapCalls = 0;
|
||||
var p = new Proxy({prop: 1}, {
|
||||
deleteProperty: function(t, prop) {
|
||||
Object.preventExtensions(t);
|
||||
trapCalls++;
|
||||
return true;
|
||||
},
|
||||
});
|
||||
|
||||
try {
|
||||
Reflect.deleteProperty (p, "prop");
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
assert (trapCalls == 1);
|
||||
|
||||
Reference in New Issue
Block a user