We should not keep the JavaScript tests inside the Source/JavaScriptCore/ directory.
[WebKit-https.git] / JSTests / es6 / Proxy_defineProperty_handler.js
1 function test() {
2
3 var proxied = {};
4 var passed = false;
5 Object.defineProperty(
6   new Proxy(proxied, {
7     defineProperty: function (t, k, d) {
8       passed = t === proxied && k === "foo" && d.value === 5;
9       return true;
10     }
11   }),
12   "foo",
13   { value: 5, configurable: true }
14 );
15 return passed;
16       
17 }
18
19 if (!test())
20     throw new Error("Test failed");
21