【发布时间】:2017-10-03 20:51:04
【问题描述】:
在运行 create-react-app 后尝试设置 AVA。我已经找到并尝试了一些this gist 的教程和参考资料,但我一直在 JSX <App /> 元素上收到 unexpected token 错误。有人知道那个要点有什么问题吗? npm run test的完整输出:
react-with-ava@0.1.0 test /react-with-ava
cross-env NODE_ENV=test ava
1 exception
Uncaught Exception
SyntaxError: /react-with-ava/src/App.test.js: Unexpected token (8:18)
SyntaxError: /react-with-ava/src/App.test.js: Unexpected token (8:18)
6 | test('renders without crashing', t => {
7 | const div = document.createElement('div');
8 | ReactDOM.render(<App />, div);
| ^
9 | });
【问题讨论】:
标签: node.js reactjs babeljs ava