Skip to content
Snippets Groups Projects
Commit 5424c811 authored by Joseph Pecoraro's avatar Joseph Pecoraro Committed by Leo Balter
Browse files

Fix Function.prototype.bind test (#958)

The `length` property should be [[Configurable]]
https://tc39.github.io/ecma262/#sec-function.prototype.bind

Also the test was testing deleting the wrong property.

Fixes #957.
parent 9ed24917
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
es5id: 15.3.4.5-15-5 es5id: 15.3.4.5-15-5
description: > description: >
Function.prototype.bind - The [[Configurable]] attribute of length Function.prototype.bind - The [[Configurable]] attribute of length
property in F set as false property in F set as true
---*/ ---*/
var canConfigurable = false; var canConfigurable = false;
...@@ -13,8 +13,8 @@ description: > ...@@ -13,8 +13,8 @@ description: >
function foo() { } function foo() { }
var obj = foo.bind({}); var obj = foo.bind({});
hasProperty = obj.hasOwnProperty("length"); hasProperty = obj.hasOwnProperty("length");
delete obj.caller; delete obj.length;
canConfigurable = !obj.hasOwnProperty("length"); canConfigurable = !obj.hasOwnProperty("length");
assert(hasProperty, 'hasProperty !== true'); assert(hasProperty, 'hasProperty !== true');
assert.sameValue(canConfigurable, false, 'canConfigurable'); assert(canConfigurable, 'canConfigurable !== true');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment