Skip to content

Commit

Permalink
test: add "bind()" test
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Jan 1, 2016
1 parent 09b1961 commit 4cefcde
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,9 @@ assert.equal(thisArg()()(), thisArg());
assert.equal(thisArg.call(global), global);
assert.equal(thisArg.call(1).valueOf(), 1);
assert.equal(thisArg.call(true).valueOf(), true);

var that = { foo: 'bar' };
var thatArg = thisArg.bind(that);
assert.equal(thatArg(), that);
assert.equal(thatArg().foo, 'bar');
assert.equal(thatArg.call(global), that);

0 comments on commit 4cefcde

Please sign in to comment.