gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 787 forks source link

feature request: ignore file with comment #740

Open bdwain opened 7 years ago

bdwain commented 7 years ago

i have a file that i don't want to test. it contains a bunch of expressions and it would be nicer to just have one comment at the top of the file instead of multiple / istanbul ignore next /

vinimdocarmo commented 7 years ago

+1

semi-sentient commented 7 years ago

I would love to see this as well. I have a React app and don't need to test my connected components, so this would be a nice way to skip those.

franciscop-invast commented 6 years ago

Proposed: /* istanbul ignore */

arthurxavierx commented 6 years ago

/* istanbul ignore file */ works.

franciscop-invast commented 6 years ago

thank you @arthurxavierx

Ross-Esmond commented 6 years ago

/* istanbul ignore file */ should definitely be added to ignoring-code-for-coverage.

ericsoco commented 6 years ago

/* istanbul ignore file */ didn't work for me, and looking in the source it looks like it shouldn't...?

UPDATE: I was on nyc@10.3.2, updating to nyc@13 got this working.

YuCJ commented 2 years ago

/* istanbul ignore file */ is added to the document of istanbuljs/nyc. See: https://github.com/istanbuljs/nyc#parsing-hints-ignoring-lines