Last active
November 17, 2016 14:13
-
-
Save valscion/25989e714380f2eabe52d170d6ca6f41 to your computer and use it in GitHub Desktop.
#create-react-app/1052 example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/packages/react-scripts/template/src/App.test.js b/packages/react-scripts/template/src/App.test.js | |
index b84af98..8cefbcf 100644 | |
--- a/packages/react-scripts/template/src/App.test.js | |
+++ b/packages/react-scripts/template/src/App.test.js | |
@@ -3,6 +3,12 @@ import ReactDOM from 'react-dom'; | |
import App from './App'; | |
it('renders without crashing', () => { | |
+ const fn = ({ a, ...otherProps }) => otherProps; | |
+ | |
+ fn({ a: 1, b: 2 }); | |
+ | |
+ console.log(fn({ a: 1, b: 2 })); | |
+ | |
const div = document.createElement('div'); | |
ReactDOM.render(<App />, div); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FAIL src/App.test.js | |
● Test suite failed to run | |
/Users/vesa/code/muut/create-react-app/packages/react-scripts/template/src/App.test.js:6 | |
const fn = ({ a, ...otherProps }) => otherProps; | |
^^^ | |
SyntaxError: Unexpected token ... | |
at transformAndBuildScript (../node_modules/jest/node_modules/jest-cli/node_modules/jest-runtime/build/transform.js:284:10) | |
at process._tickCallback (../../../internal/process/next_tick.js:103:7) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment