WSL should have more tests of type checking failures
[WebKit-https.git] / JSTests / es6 / miscellaneous_function_length_is_configurable.js
1 function test() {
2
3 var fn = function(a, b) {};
4
5 var desc = Object.getOwnPropertyDescriptor(fn, "length");
6 if (desc.configurable) {
7   Object.defineProperty(fn, "length", { value: 1 });
8   return fn.length === 1;
9 }
10
11 return false;
12       
13 }
14
15 if (!test())
16     throw new Error("Test failed");
17