Static GitHub Issues

[840] Code coverage using nyc and ava guide

prev: This page could not be found
next: window is not defined

Hey @alexchopin , I'm trying to configure nyc and ava to get the code coverage report but currently it just outputs a 100% coverage for the files .eslintrc,.nuxt.config.js and modules directory. I searched but couldn't find a way to get the coverage for .vue files using nyc ava. Vue.js documentation currently uses karma etc.

NYC config:

"nyc": {
    "exclude": [
      "modules",
      "plugins",
      "static",
      "assets",
      "**/*.test.js",
      ".eslintrc.js",
      "nuxt.config.js"
    ],
    "extension": [
      ".js",
      ".vue"
    ]
  }

Test commands:

"test": "./node_modules/.bin/nyc ava",
"report": "./node_modules/.bin/nyc report --reporter=html",
"codecov": "./node_modules/.bin/nyc report --reporter=lcov > coverage.lcov && codecov"
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c719">#c719</a>)</em></sub></div>