blob: e72f84019f3f5e8700d9a8f163dd5a4b5268f1c3 [file] [log] [blame]
Tests for ES6 arrow function lexical bind of this
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS d.getName() is d.name
PASS d.getNameHard() is d.name
PASS d.getNameNesting()()() is d.name
PASS obj.method()('correct') is 'objCode-name-correct'
PASS obj.method()('correct') is 'newObjCode-name-correct'
PASS deepObj.internalObject.method()('correct') is 'internalObject-name-correct'
PASS deepObj.internalObject.method()('correct') is 'newInternalObject-name-correct'
PASS instance.func() === instance is true
PASS ownerObj.method()() === ownerObj is true
PASS fake.steal() === ownerObj is true
PASS real.borrow()() === real is true
PASS arrowFunction('-this') is "right-this"
PASS hostObj.func('-this') is "right-this"
PASS arrowWithEval.func() is "new-value"
PASS fooObject.arr() is internal_value_1
PASS fooObject._id is internal_value_2
PASS boo.call(expected) is expected
PASS (function () { return (a = this)=>{return a;}; }).call(expected)() is expected
PASS successfullyParsed is true
TEST COMPLETE