Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions tests/06-arrow-functions-binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ var assert = require("assert");
class LexicallyBound {

getFunction() {
return () => {
return this;
}
return () => this;
}

getArgumentsFunction() {
return () => arguments
return () => arguments;
}

}
Expand All @@ -30,9 +28,9 @@ describe('arrow functions have lexical `this`, no dynamic `this`', () => {
var bound = new LexicallyBound();
var fn = bound.getFunction();
var anotherObj = {};
var expected = anotherObj;
var expected = fn(anotherObj);

assert.strictEqual(fn.call(anotherObj), bound);
assert.strictEqual(fn.call(anotherObj), expected);
});

it('`arguments` doesnt work inside arrow functions', function() {
Expand Down