From 27d30329fda85913d86f4189f1c87aaa1a0a7b13 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 12 Nov 2014 12:18:16 +1100 Subject: [PATCH] add more react spread tests --- .../actual.js | 0 .../expected.js | 0 .../actual.js | 1 + .../expected.js | 4 ++++ .../actual.js | 1 + .../expected.js | 5 +++++ 6 files changed, 11 insertions(+) rename test/fixtures/transformation/react/{wraps-props-in-react-spread-for-spread-attributes => wraps-props-in-react-spread-for-first-spread-attributes}/actual.js (100%) rename test/fixtures/transformation/react/{wraps-props-in-react-spread-for-spread-attributes => wraps-props-in-react-spread-for-first-spread-attributes}/expected.js (100%) create mode 100644 test/fixtures/transformation/react/wraps-props-in-react-spread-for-last-spread-attributes/actual.js create mode 100644 test/fixtures/transformation/react/wraps-props-in-react-spread-for-last-spread-attributes/expected.js create mode 100644 test/fixtures/transformation/react/wraps-props-in-react-spread-for-middle-spread-attributes/actual.js create mode 100644 test/fixtures/transformation/react/wraps-props-in-react-spread-for-middle-spread-attributes/expected.js diff --git a/test/fixtures/transformation/react/wraps-props-in-react-spread-for-spread-attributes/actual.js b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-first-spread-attributes/actual.js similarity index 100% rename from test/fixtures/transformation/react/wraps-props-in-react-spread-for-spread-attributes/actual.js rename to test/fixtures/transformation/react/wraps-props-in-react-spread-for-first-spread-attributes/actual.js diff --git a/test/fixtures/transformation/react/wraps-props-in-react-spread-for-spread-attributes/expected.js b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-first-spread-attributes/expected.js similarity index 100% rename from test/fixtures/transformation/react/wraps-props-in-react-spread-for-spread-attributes/expected.js rename to test/fixtures/transformation/react/wraps-props-in-react-spread-for-first-spread-attributes/expected.js diff --git a/test/fixtures/transformation/react/wraps-props-in-react-spread-for-last-spread-attributes/actual.js b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-last-spread-attributes/actual.js new file mode 100644 index 0000000000..ce7fb5b60f --- /dev/null +++ b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-last-spread-attributes/actual.js @@ -0,0 +1 @@ + diff --git a/test/fixtures/transformation/react/wraps-props-in-react-spread-for-last-spread-attributes/expected.js b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-last-spread-attributes/expected.js new file mode 100644 index 0000000000..6b897925d0 --- /dev/null +++ b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-last-spread-attributes/expected.js @@ -0,0 +1,4 @@ +React.createElement(Component, React.__spread({ + y: 2, + z: true +}, x)); diff --git a/test/fixtures/transformation/react/wraps-props-in-react-spread-for-middle-spread-attributes/actual.js b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-middle-spread-attributes/actual.js new file mode 100644 index 0000000000..919adaebb4 --- /dev/null +++ b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-middle-spread-attributes/actual.js @@ -0,0 +1 @@ + diff --git a/test/fixtures/transformation/react/wraps-props-in-react-spread-for-middle-spread-attributes/expected.js b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-middle-spread-attributes/expected.js new file mode 100644 index 0000000000..53595afca9 --- /dev/null +++ b/test/fixtures/transformation/react/wraps-props-in-react-spread-for-middle-spread-attributes/expected.js @@ -0,0 +1,5 @@ +React.createElement(Component, React.__spread({ + y: 2 +}, x, { + z: true +}));