【发布时间】:2017-10-26 00:38:03
【问题描述】:
我正在运行 jest/react 测试并收到以下错误:
/Users/sn/Documents/react-testing-with-jest-master/starter/CountdownTimer/jest.config.js:2
"moduleFileExtensions": [
^
SyntaxError: Unexpected token :
npm ERR! Test failed. See above for more details.
这是我的 jest.config.js:
{
"moduleFileExtensions": [
"js",
"jsx"
],
"moduleNameMapper": {
"Clock": "<rootDir>/app/components/Clock.jsx",
"CountdownForm": "<rootDir>/app/components/CountdownForm.jsx",
"Countdown": "<rootDir>/app/components/Countdown.jsx"
}
}
【问题讨论】:
标签: reactjs configuration jestjs