There are seemingly a few incompatibilities with Vue and Istanbul/nyc at the moment, making it a bit difficult to set up proper coverage reporting for Vue files. Thankfully, there's a relatively easy way to fix that!
This will walk you through everything you need to do to add tests and coverage reporting to your vue-cli based project.
-
Install dependencies for testing and coverage reporting
yarn add -D @vue/cli-plugin-unit-mocha @vue/test-utils istanbul-instrumenter-loader nyc