Skip to content

Commit c5d4f6a

Browse files
committed
fix Function#bind global test
1 parent 752e72c commit c5d4f6a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/unit-global/es.function.bind.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ QUnit.test('Function#bind', assert => {
55
assert.name(bind, 'bind');
66
assert.looksNative(bind);
77
assert.nonEnumerable(Function.prototype, 'bind');
8+
const object = { a: 42 };
89
assert.same(function () {
910
return this.a;
10-
}.bind({ a: 42 })(), 42);
11-
assert.same(new function () { /* empty */ }().a, undefined);
11+
}.bind(object)(), 42);
12+
// eslint-disable-next-line no-extra-bind -- testing
13+
assert.same(new (function () { /* empty */ }.bind(object))().a, undefined);
1214
function A(a, b) {
1315
this.a = a;
1416
this.b = b;

0 commit comments

Comments
 (0)