babel-plugin-__coverage__ icon indicating copy to clipboard operation
babel-plugin-__coverage__ copied to clipboard

support coverage ignore hints

Open yyx990803 opened this issue 9 years ago • 4 comments

Support either /* istanbul ignore next/if/else */ or /* coverage ignore next/if/else */

yyx990803 avatar May 18 '16 05:05 yyx990803

Thanks a lot for your patch! 😃

I’ll take a closer look when I have more time.

dtinth avatar May 20 '16 03:05 dtinth

Seems that it doesn’t work with exported function:

// coverage ignore next
export function hello () {
  itsMe()
}

Normal function works:

// coverage ignore next
function hello () {
  fromTheOtherSide()
}

dtinth avatar May 23 '16 04:05 dtinth

Anything I can do to help get this through the finish line? I want to make this plugin the de-facto standard for code coverage with babel-transpiled codebases, and I think that I'd get a bit of push back until this is implemented :-)

kentcdodds avatar Jun 08 '16 02:06 kentcdodds

@kentcdodds I currently don't have the bandwidth to improve this due to my fork fitting my current use case, but feel free to fork from my fork and see if you can address any remaining problems!

yyx990803 avatar Jun 08 '16 17:06 yyx990803