istanbul icon indicating copy to clipboard operation
istanbul copied to clipboard

feature request: ignore file with comment

Open bdwain opened this issue 8 years ago • 8 comments

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 */

bdwain avatar Dec 28 '16 07:12 bdwain

+1

vinimdocarmo avatar Jan 31 '17 19:01 vinimdocarmo

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.

semi-sentient avatar Mar 21 '17 13:03 semi-sentient

Proposed: /* istanbul ignore */

franciscop-invast avatar May 30 '18 08:05 franciscop-invast

/* istanbul ignore file */ works.

arthurxavierx avatar Jun 01 '18 12:06 arthurxavierx

thank you @arthurxavierx

franciscop-invast avatar Jun 03 '18 23:06 franciscop-invast

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

Ross-Esmond avatar Jun 12 '18 21:06 Ross-Esmond

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

UPDATE: I was on [email protected], updating to nyc@13 got this working.

ericsoco avatar Sep 19 '18 19:09 ericsoco

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

YuCJ avatar Jun 01 '22 09:06 YuCJ