Skip to content

Unit tests for checkHardReview and checkMilestone10 #91

Description

@geetxnshgoyal

What

checkHardReview and checkMilestone10 in lib/pr-journey.ts encode milestone 9 (3+ review rounds or closed) and milestone 10 (must be merged).

There are no tests for it yet.

Cover at least

  • milestone 9: closed with 0 rounds passes, open with 3 rounds passes, merged with 2 rounds throws
  • the milestone 9 error message includes the actual round count
  • milestone 10: merged passes, open throws, closed throws

How

  • Create lib/pr-journey.test.ts next to the code. Follow the style of lib/github-auth.test.ts.
  • Run npm test. Then break the code on purpose (flip a condition) and watch at least one of your tests fail. Paste that failure output in the PR description, then undo the break.
  • Test behaviour through the exported function only. Don't change the source file unless you find a bug, and if you do, stop and comment on this issue first.

Size: ~30–60 lines of tests, 0 lines of source.


Taking this? Comment /assign and the bot assigns you if it's free. One issue per person at a time; comment /unassign to hand it back. That's milestone 2 of the 10 PR Journey. Setup, the checks CI runs, and how to open the PR from your fork are in CONTRIBUTING.md. Put Fixes #<this issue> in your PR description.

Activity

  1. divyanshkush437-source commented on Sep 26, 2026

    @divyanshkush437-source

    /assign

  2. github-actions commented on Sep 26, 2026

    @github-actions

    @divyanshkush437-source it's yours! 🎉

    1. Fork the repo and create a branch: see CONTRIBUTING.md.
    2. Open your PR from your fork into main, with Fixes #91 in the description.
    3. Make sure CI (Lint, Test, Type-check & build) is green.

    Can't finish it? Comment /unassign so someone else can pick it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions