diff options
Diffstat (limited to 'Libraries/LibJS/Tests/arrow-functions.js')
-rw-r--r-- | Libraries/LibJS/Tests/arrow-functions.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Libraries/LibJS/Tests/arrow-functions.js b/Libraries/LibJS/Tests/arrow-functions.js index ba2cb5cb0b..d34a7836f2 100644 --- a/Libraries/LibJS/Tests/arrow-functions.js +++ b/Libraries/LibJS/Tests/arrow-functions.js @@ -64,6 +64,19 @@ try { assert(foo === undefined); assert(bar === undefined); + function FooBar() { + this.x = { + y: () => this, + z: function () { + return (() => this)(); + } + }; + } + + var foobar = new FooBar(); + assert(foobar.x.y() === foobar); + assert(foobar.x.z() === foobar.x); + (() => { "use strict"; assert(isStrictMode()); |