bencodezen / vue-enterprise-boilerplate

An ever-evolving, very opinionated architecture and dev environment for new Vue SPA projects using Vue CLI.
7.78k stars 1.32k forks source link

Jest SyntaxError: Unexpected token ... #20

Closed beyer-martin closed 6 years ago

beyer-martin commented 6 years ago

Cant get vscode Jest working, when I start it on the output tab I get this error:

SyntaxError: Unexpected token ... at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:374:25) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object. (/Users/beyersito/Projects/TryIT/vue-enterprise/tests/mock-api/routes/auth.js:1:77) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10)

Finished running all tests. Starting watch mode. SyntaxError: Unexpected token ... at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:374:25) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object. (/Users/beyersito/Projects/TryIT/vue-enterprise/tests/mock-api/routes/auth.js:1:77) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10)

When I run yarn run unit:watch, it works as expected.

beyer-martin commented 6 years ago

Had to do with nvm, fixed by setting to default version 8.9.3