dylanb / gulp-coverage

Gulp coverage reporting for Node.js that is independent of the test runner
MIT License
60 stars 12 forks source link

Unable to ignore lines of code with `//#JSCOVERAGE_IF` #26

Closed nakardo closed 10 years ago

nakardo commented 10 years ago

I've been unable to ignore certain lines of code, as stated on the JSCoverage docs. I'm doing something like on the following snippet:

//#JSCOVERAGE_IF
if (!module.parent) {
  server.start(function () {
    server.log('info', 'Server running at: ' + server.info.uri);
  });
}

Same applies enclosing the code using the form //#JSCOVERAGE_IF 0, //#JSCOVERAGE_ENDIF.

Is this currently supported or am I doing something wrong?

Thanks!

dylanb commented 10 years ago

This is not supported currently, where did you get the idea from that it is supported?

nakardo commented 10 years ago

My bad, I thought your plugin was based on the project I linked so I was expecting that to work. I'll close the issue. I'd be nice if you can consider adding something like that on the future.

Thanks again!

dylanb commented 10 years ago

re-opening issue while I look into a possible solution

dylanb commented 10 years ago

@dmacosta Can you clone the latest master and see whether that works for you?

dylanb commented 10 years ago

@dmacosta actually, I published this as version 0.3.27, so you can just update your dependencies

nakardo commented 10 years ago

Works great, thanks! :grinning: