I'm trying to set up Enzyme (written by Airbnb) in order to run some UI tests in React. However, no matter what configuration I have (and I've tried several) I keep getting this error. I added a .babelrc
file which has the following inside:
{
"presets": ["airbnb"]
}
but it still gives me the same error. The .babelrc
file is on the same level as the package.json
file. I've searched everywhere online to see what could be causing this, but I'm at a loss. Any ideas?
确保安装预设
npm install --save-dev babel-preset-airbnb
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.