Skip to content

Commit

Permalink
Correct test/built-ins/Function/prototype/bind/15.3.4.5-15-5.js
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 tc39#957.
  • Loading branch information
JosephPecoraro committed Apr 10, 2017
1 parent 3c79e9d commit 9d08925
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 9d08925

Please sign in to comment.