Skip to content

test: cover all badges and run badge tests in CI - #547

Open
YashBora21 wants to merge 4 commits into
codepvg:mainfrom
YashBora21:feature/badge-tests-ci
Open

YashBora21 wants to merge 4 commits into
codepvg:mainfrom
YashBora21:feature/badge-tests-ci

Conversation

@YashBora21

@YashBora21 YashBora21 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

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 test script and a Badge Tests workflow for PRs that change the badge code or its test file.

npm test uses node --test because node --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 failed
  • npx prettier --check tests/badges.test.cjs package.json .github/workflows/badge-tests.yml: passed
  • git diff --check: passed
  • GitHub Actions Badge Tests and Prettier Check: passed

CI result screenshot:

Badge Tests CI result: 8 passed, 0 failed

Closes #546

@github-actions

Copy link
Copy Markdown
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

  • Please confirm you have formatted your code locally using npx prettier --write . before requesting a review.
  • Ensure this PR is made from a feature/* branch and not main.

Note: This project is currently maintained by a solo maintainer, so reviews and responses may sometimes take a little time. Thanks for your patience.

Add test case for HARD_CARRY badge with few hard entries

This branch has not been deployed

No deployments
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.

test: add unit tests for all badges and CI workflow on badge changes

1 participant