-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Allows usage of ignoreClassMethods from istanbul #785
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 thanks for the contribution @katerberg
It looks like the tests are failing on Travis due to a linting error, if you don't mind pushing a fix.
It would also be great to add a test for this behavior; I'd be fine with an integration test in nyc-bin.js
👍
@bcoe I think I got all of it in now! Let me know what you think. |
@@ -71,6 +71,30 @@ describe('the nyc cli', function () { | |||
}) | |||
}) | |||
|
|||
describe('--ignore-class-method', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, thank you for the test 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good to me, just a couple tiny nits.
test/nyc-bin.js
Outdated
@@ -71,6 +71,30 @@ describe('the nyc cli', function () { | |||
}) | |||
}) | |||
|
|||
describe('--ignore-class-method', function () { | |||
if (parseInt(process.versions.node.split('.')[0]) < 4) return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this check should be needed; we dropped Node <4 support in CI a few months ago.
README.md
Outdated
@@ -272,6 +272,7 @@ Any configuration options that can be set via the command line can also be speci | |||
"exclude": [ | |||
"src/**/*.spec.js" | |||
], | |||
"ignore-class-method: "methodToIgnore", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
theres a missing closing "
on ignore-class-method
.
Updated @bcoe! Let me know if you'd like anything else changed. |
@katerberg your work is released, please give the latest version of nyc a shot. |
Worked beautifully! Thanks for merging it. It's nice to have our project back on mainline :D |
This allows ignoring of class methods of a certain name as a whole rather than having to manually ignore each instance. It is the companion to istanbuljs/istanbuljs#127