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

How to ignore files (e.g: libraries) from coverage using a .istanbul.yml file? #9

Open
nelsonic opened this issue May 25, 2016 · 0 comments

Comments

@nelsonic
Copy link
Member

Sometimes you want to ignore a specific file or even a folder from being checked by Istanbul
e.g you include a 3rd party library or code in your project (instead of putting it on a CDN)

You can define a list of excludes files in a .istanbul.yml at the root of your project/repo.

Its not an especially well-documented feature... There's only one reference to .istanbul.yml in the entire Istanbul project, see: https://github.com/gotwarlost/istanbul/search?l=markdown&q=.istanbul.yml&utf8=%E2%9C%93

There are examples on the StackOverflows if you search for them. e.g: http://stackoverflow.com/a/34685175/1148249

instrumentation:
    root: .
    extensions:
        - .js
    default-excludes: true
    excludes: ['**/tinymce/**', '**/lib/**', '**/tools/**', '**/build/**']
    include-all-sources: true

a more detailed sample file: https://github.com/vesln/todo/blob/master/.istanbul.yml

@nikhilaravi needed this today in our project, it reminded me we should add it to the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant