Unexpected token import in custom node environment
问题 I am getting a SyntaxError: Unexpected token import when using my custom class that extends NodeEnvironment . When not using a custom test environment, modern JavaScript - ES modules, etc. works fine. I'm using node 8.11.1 and yarn 1.6.0 . This is the full error: $ jest --no-cache FAIL __tests__/math.js ● Test suite failed to run /home/user/workspace/web/jest-custom-environment-no-import/__tests__/_helpers_/environments/integration.js:1 (function (exports, require, module, __filename, _