mocha 单元测试 es6 babel转码错误

执行:mocha --compilers js:babel-core/register ./server/**/*.test.js

package.json:

{

 {

"devDependencies": {

    "babel-core": "^6.26.3",

    "babel-eslint": "^8.2.4",

    "babel-preset-es2015": "^6.24.1",

    "babel-register": "^6.26.0",

    "backpack-core": "^0.7.0",

    "chai": "^4.2.0",

    "eslint": "^4.19.1",

    "eslint-config-standard": "^11.0.0",

    "eslint-loader": "^2.0.0",

    "eslint-plugin-html": "^4.0.5",

    "eslint-plugin-import": "^2.12.0",

    "eslint-plugin-node": "^6.0.1",

    "eslint-plugin-promise": "^3.8.0",

    "eslint-plugin-standard": "^3.1.0",

    "husky": "^0.14.3",

    "mocha": "^5.2.0",

    "nodemon": "^1.17.5",

    "scmp": "^2.0.0"

  }

}

你可能感兴趣的:(mocha 单元测试 es6 babel转码错误)