bug(test): Fix short circuit bug, testcase snapshots and deprecated codecov action#544
Conversation
Logical OR assignment was causing short circuit and not run for each contributor
|
@gerteck is attempting to deploy a commit to the All Contributors Team on Vercel. A member of the Team first needs to authorize it. |
|
Changes to testcase and logic passes all testcases: |
|
Will take a look & investigate the failing CI tests! Edit: Use |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #544 +/- ##
========================================
Coverage ? 100.00%
========================================
Files ? 16
Lines ? 457
Branches ? 57
========================================
Hits ? 457
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@all-contributors please add @gerteck for tests, bug |
|
I've put up a pull request to add @gerteck! 🎉 |
Adds @gerteck as a contributor for test, bug. This was requested by lwasser [in this comment](#544 (comment)) [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
lwasser
left a comment
There was a problem hiding this comment.
This looks great! Tests run well locally and now seem to loop through all contribs! Oddly, I don't think that feature actually works to add 2 people in one request to the bot. But that is for another day!
What:
Fixes #530
Why:
Identified that the cause of the testcase failures were from PR #489, to address #468 , as it introduced a small logical error and also added a new testcase for the identified bug without updating the test snapshots.
How:
Use of the logical bug
pullCreated ||= await triggerActionAdd(...);within theforloop caused it to short circuit after the first contributor, aspullCreatedis set to True after including the first contributor, and short circuit for subsequent iterations in the loop (causing it to not add subsequent contributors in the list).Testcase snapshot outdated due to added case to account for the bug identified in the PR
Testcase snapshot oudated due to change in logging from that PR i.e.
log.info(No contributions for ${who});Testcases were tested on Node v22.22.0 (LTS)
Additionally, update codecov workflow to use
codecov-actioninstead of deprecated codecov npm package (v3.8.3), see codecov npm which is no longer functioning correctly in the CI environment.Checklist:
Bot Usage