diff --git a/test/babel/fixtures/class-properties/not-a-function/.babelrc b/test/babel/fixtures/class-properties/not-a-function/.babelrc new file mode 100644 index 000000000..4075556b7 --- /dev/null +++ b/test/babel/fixtures/class-properties/not-a-function/.babelrc @@ -0,0 +1,3 @@ +{ + "plugins": ["syntax-class-properties", "../../../../../src/babel"] +} diff --git a/test/babel/fixtures/class-properties/not-a-function/actual.js b/test/babel/fixtures/class-properties/not-a-function/actual.js new file mode 100644 index 000000000..d4c4a0e33 --- /dev/null +++ b/test/babel/fixtures/class-properties/not-a-function/actual.js @@ -0,0 +1,3 @@ +class Foo { + bar = 2; +} diff --git a/test/babel/fixtures/class-properties/not-a-function/expected.js b/test/babel/fixtures/class-properties/not-a-function/expected.js new file mode 100644 index 000000000..6e2cf5432 --- /dev/null +++ b/test/babel/fixtures/class-properties/not-a-function/expected.js @@ -0,0 +1,14 @@ +class Foo { + bar = 2; +} +; + +var _temp = function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register(Foo, "Foo", __FILENAME__); +}(); + +; diff --git a/test/babel/fixtures/class-properties/not-an-arrow-function/.babelrc b/test/babel/fixtures/class-properties/not-an-arrow-function/.babelrc new file mode 100644 index 000000000..4075556b7 --- /dev/null +++ b/test/babel/fixtures/class-properties/not-an-arrow-function/.babelrc @@ -0,0 +1,3 @@ +{ + "plugins": ["syntax-class-properties", "../../../../../src/babel"] +} diff --git a/test/babel/fixtures/class-properties/not-an-arrow-function/actual.js b/test/babel/fixtures/class-properties/not-an-arrow-function/actual.js new file mode 100644 index 000000000..1341d81af --- /dev/null +++ b/test/babel/fixtures/class-properties/not-an-arrow-function/actual.js @@ -0,0 +1,5 @@ +class Foo { + bar = function (a, b) { + return a(b); + }; +} diff --git a/test/babel/fixtures/class-properties/not-an-arrow-function/expected.js b/test/babel/fixtures/class-properties/not-an-arrow-function/expected.js new file mode 100644 index 000000000..3799c87a6 --- /dev/null +++ b/test/babel/fixtures/class-properties/not-an-arrow-function/expected.js @@ -0,0 +1,16 @@ +class Foo { + bar = function (a, b) { + return a(b); + }; +} +; + +var _temp = function () { + if (typeof __REACT_HOT_LOADER__ === 'undefined') { + return; + } + + __REACT_HOT_LOADER__.register(Foo, "Foo", __FILENAME__); +}(); + +;