We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Function#bind
1 parent 752e72c commit c5d4f6aCopy full SHA for c5d4f6a
tests/unit-global/es.function.bind.js
@@ -5,10 +5,12 @@ QUnit.test('Function#bind', assert => {
5
assert.name(bind, 'bind');
6
assert.looksNative(bind);
7
assert.nonEnumerable(Function.prototype, 'bind');
8
+ const object = { a: 42 };
9
assert.same(function () {
10
return this.a;
- }.bind({ a: 42 })(), 42);
11
- assert.same(new function () { /* empty */ }().a, undefined);
+ }.bind(object)(), 42);
12
+ // eslint-disable-next-line no-extra-bind -- testing
13
+ assert.same(new (function () { /* empty */ }.bind(object))().a, undefined);
14
function A(a, b) {
15
this.a = a;
16
this.b = b;
0 commit comments