Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add tolerance option #16

Merged
merged 5 commits into from
Mar 26, 2023
Merged

Conversation

JCorpe26
Copy link
Contributor

@JCorpe26 JCorpe26 commented Feb 28, 2023

Add the ability to provide a tolerance amount to allow a bit of wiggle room for the new coverage. So it isn't updated to the exact amount.

New Coverage Tolerance Outcome
50 5 45
66 1 65

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (b69f172) 100.00% compared to head (8390357) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #16   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines           68        69    +1     
=========================================
+ Hits            68        69    +1     
Impacted Files Coverage Δ
lib/getNewThresholds.js 100.00% <100.00%> (ø)
lib/index.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Owner

@rbardini rbardini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @JCorpe26!

Sorry for the belated review; added one small change request before merging this in ✨

bin/jest-it-up Outdated
@@ -7,6 +7,12 @@ const jestItUp = require('../lib')
program
.option('-c, --config <path>', 'path to a Jest config file', 'jest.config.js')
.option('-m, --margin <margin>', 'minimum threshold increase', parseFloat, 0)
.option(
'-t, --tolerance <tolerance>',
'keeps the new threshold below the current coverage',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to describe the option value instead:

Suggested change
'keeps the new threshold below the current coverage',
'threshold difference from actual coverage',

Please remember to update the README accordingly—I recommend running jest-it-up --help and copy-pasting the output there.

@JCorpe26 JCorpe26 force-pushed the add-tolerance-option branch from 582305c to 25af4d9 Compare March 20, 2023 08:54
@JCorpe26
Copy link
Contributor Author

@rbardini Fair shout, I have updated this :) 🤞 Should be all good now

@JCorpe26 JCorpe26 requested a review from rbardini March 20, 2023 08:56
@rbardini rbardini merged commit 66018e5 into rbardini:master Mar 26, 2023
@github-actions
Copy link

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants