Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Istanbul default excludes not working #585

Closed
jaydenseric opened this issue Aug 8, 2019 · 2 comments
Closed

Istanbul default excludes not working #585

jaydenseric opened this issue Aug 8, 2019 · 2 comments

Comments

@jaydenseric
Copy link

According to the istanbul docs:

The default exclude list is defined in the test-exclude module.

The defaults contain test{,-*}.{js,cjs,mjs,ts} and **/*{.,-}test.{js,cjs,mjs,ts}, so I don't know why such files are being coverage checked in my projects:

Screen Shot 2019-08-08 at 7 29 32 pm

The workaround is to add a .nycrc.json file to your project like this:

{
  "exclude": ["**/*.test.*"]
}
@coreyfarrell
Copy link
Member

The docs on github show master, unfortunately right now this is different from the currently released version. The default excludes for the current version of nyc can be viewed at https://github.com/istanbuljs/istanbuljs/blob/test-exclude%405.2.3/packages/test-exclude/index.js#L176-L184 (test-exclude@5.2.3).

The additional default excludes will be provided as part of test-exclude@6.0.0 and nyc@15.0.0. No ETA on the full release of these new versions, progress can be followed at istanbuljs/nyc#1104.

@isaacs
Copy link
Member

isaacs commented Oct 18, 2019

As of tap 14.7.2, it'll also explicitly exclude any test files it runs. Should fix this issue for you.

@isaacs isaacs closed this as completed Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants