score:1

Accepted answer

You need to connect the babel to compile es6 syntax.

package.json:

"scripts": {
   "test": "mocha --require @babel/register"
},

Related Query

More Query from same tag