Repository navigation
test: cover all badges and run badge tests in CI - #547
Open
YashBora21 wants to merge 4 commits into
Open
YashBora21 wants to merge 4 commits into
YashBora21 wants to merge 4 commits into
Conversation
Contributor
|
Thank you for submitting a pull request. Please ensure your changes comply with the project's contribution guidelines and that all workflow checks pass successfully. Formatting and Branching
|
Add test case for HARD_CARRY badge with few hard entries
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
I expanded the test file from #545 to cover all eight badges. Each badge has an earned case and a locked case, including boundary values for the counts and ranks. I also added an
npm testscript and a Badge Tests workflow for PRs that change the badge code or its test file.npm testusesnode --testbecausenode --test tests/failed locally by treating the directory as a module. The workflow runs the specific test file on Node 20.Checks
npm test: 8 tests passed, 0 failednpx prettier --check tests/badges.test.cjs package.json .github/workflows/badge-tests.yml: passedgit diff --check: passedCI result screenshot:
Closes #546