Skip to content
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

Merged
merged 8 commits into from
Mar 13, 2018

Conversation

katerberg
Copy link
Contributor

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

Copy link
Member

@bcoe bcoe left a 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 👍

@katerberg
Copy link
Contributor Author

@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 () {
Copy link
Member

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 👍

Copy link
Member

@bcoe bcoe left a 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
Copy link
Member

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",
Copy link
Member

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.

@katerberg
Copy link
Contributor Author

Updated @bcoe! Let me know if you'd like anything else changed.

@bcoe
Copy link
Member

bcoe commented Mar 13, 2018

@katerberg your work is released, please give the latest version of nyc a shot.

@katerberg
Copy link
Contributor Author

Worked beautifully! Thanks for merging it. It's nice to have our project back on mainline :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants