karma-runner / karma-coverage

A Karma plugin. Generate code coverage.
MIT License
770 stars 247 forks source link

Derive config from .nycrc #401

Open bennypowers opened 4 years ago

bennypowers commented 4 years ago

I'd like to add a .nycrc.json in my project root and have karma-coverage pick up on it without needing to specify includes or excludes in my karma.conf.js

Example config:

{
  "include": ["src/**/*.js"],
  "exclude": [
    "**/*.test.js",
    "stories/*",
    "test/*"
  ]
}

Additionally, some users will want to specify a nyc key in their package.json with value same as above.

bennypowers commented 4 years ago

related to https://github.com/istanbuljs/nyc/issues/320