Skip to content

Commit 00f4a2b

Browse files
Remove tests of Function.prototype.bind that don't match spec behavior.
1 parent 9559d88 commit 00f4a2b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/unit/function_test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ new Test.Unit.Runner({
3333
function methodWithoutArguments() { return this.hi };
3434
function methodWithArguments() { return this.hi + ',' + $A(arguments).join(',') };
3535
var func = Prototype.emptyFunction;
36+
37+
// We used to test that `bind` without a `context` argument simply
38+
// returns the original function, but this contradicts the ES5 spec.
3639

37-
this.assertIdentical(func, func.bind());
38-
this.assertIdentical(func, func.bind(undefined));
3940
this.assertNotIdentical(func, func.bind(null));
4041

4142
this.assertEqual('without', methodWithoutArguments.bind({ hi: 'without' })());

0 commit comments

Comments
 (0)