blob: c0facd10574a1f05b58f3820b14277370037221a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
"use strict";
var target = {};
Object.defineProperty(target, "test",
{configurable: false, writable: true, value: 1});
var proxy = new Proxy(target, {
getOwnPropertyDescriptor(target, property) {
assertEq(property, "test");
return {configurable: false, writable: false, value: 1};
}
});
assertThrowsInstanceOf(() => Object.getOwnPropertyDescriptor(proxy, "test"),
TypeError);
assertThrowsInstanceOf(() => Reflect.getOwnPropertyDescriptor(proxy, "test"),
TypeError);
reportCompare(0, 0);
|