Skip to content

Commit

Permalink
Fix Function.prototype.bind test (#958)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JosephPecoraro authored and leobalter committed Apr 11, 2017
1 parent 9ed2491 commit 5424c81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/built-ins/Function/prototype/bind/15.3.4.5-15-5.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
es5id: 15.3.4.5-15-5
description: >
Function.prototype.bind - The [[Configurable]] attribute of length
property in F set as false
property in F set as true
---*/

var canConfigurable = false;
var hasProperty = false;
function foo() { }
var obj = foo.bind({});
hasProperty = obj.hasOwnProperty("length");
delete obj.caller;
delete obj.length;
canConfigurable = !obj.hasOwnProperty("length");

assert(hasProperty, 'hasProperty !== true');
assert.sameValue(canConfigurable, false, 'canConfigurable');
assert(canConfigurable, 'canConfigurable !== true');

0 comments on commit 5424c81

Please sign in to comment.