The solutions offered in other related questions, such as including the proper presets (es2015) in .babelrc, are already implemented in my project.
I have two projec
I resolved this issue this morning with the following instructions from the official Using Babel instructions for Mocha 4:
Install NPM Modules
npm install --save-dev babel-polyfill
npm install --save-dev babel-preset-env
npm install --save-dev babel-register
or a single command:
npm i -d babel-polyfill babel-preset-env babel-register
package.json:
"scripts": {
"test": "mocha --require babel-polyfill --require babel-register"
}
.babelrc
{
"presets": ["env"]
}