[Vuejs]-Jest or Mocha with Vue: SyntaxError: Cannot use import statement outside a module

-1👍

You should use vue-cli API.

In your package.json add to scripts this:

"test:unit": "vue-cli-service test:unit"

You have vue-cli and test-utils installed so it should now work.

Leave a comment