From 47a45f37316464b5eab4ce3dd3b31e573245ab11 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 30 Jan 2015 11:05:16 +1100 Subject: [PATCH] add additional react ThisExpression conversion test --- .../transformation/react/arrow-functions/actual.js | 4 ++++ .../transformation/react/arrow-functions/expected.js | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/test/fixtures/transformation/react/arrow-functions/actual.js b/test/fixtures/transformation/react/arrow-functions/actual.js index fc0906b174..91f343d349 100644 --- a/test/fixtures/transformation/react/arrow-functions/actual.js +++ b/test/fixtures/transformation/react/arrow-functions/actual.js @@ -1,3 +1,7 @@ var foo = function () { return () => ; }; + +var bar = function () { + return () => ; +}; diff --git a/test/fixtures/transformation/react/arrow-functions/expected.js b/test/fixtures/transformation/react/arrow-functions/expected.js index ba37738e61..0a2f07f0c8 100644 --- a/test/fixtures/transformation/react/arrow-functions/expected.js +++ b/test/fixtures/transformation/react/arrow-functions/expected.js @@ -4,3 +4,10 @@ var foo = function () { return React.createElement(_this, null); }; }; + +var bar = function () { + var _this = this; + return function () { + return React.createElement(_this.foo, null); + }; +};