Skip to content

[#9] Tests — fixed pairs#25

Merged
javaisbetterthanpython merged 1 commit into
mainfrom
issue-9-tests-fixed-pairs
Jun 7, 2026
Merged

[#9] Tests — fixed pairs#25
javaisbetterthanpython merged 1 commit into
mainfrom
issue-9-tests-fixed-pairs

Conversation

@javaisbetterthanpython

Copy link
Copy Markdown
Owner

Summary

  • Add a dedicated describe("fixed pairs") block in test/heuristics.spec.tsx with shared assertion helpers
  • Cover all four acceptance criteria: same-team over 10 rounds, two fixed pairs with unpaired players, atomic sit-outs, and mid-game regenerate
  • Retain volunteer sit-out test for fixed-pair partner pull-through

Test plan

  • yarn test:ci passes (18 tests)
  • yarn build passes
  • yarn lint passes
  • Fixed pair always teammates across 10 generated rounds
  • Two fixed pairs + unpaired players produce valid matches
  • Fixed pair sits out together when sit-outs required
  • Adding fixed pair mid-game keeps pair together on regenerate

Closes #9

Made with Cursor

Structured tests match issue #9 acceptance criteria with shared helpers
for team and round validation, including mid-game regenerate behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@javaisbetterthanpython

Copy link
Copy Markdown
Owner Author

APPROVE

Focused test-only change for #9. Refactors fixed-pair coverage into a dedicated describe("fixed pairs") block with shared assertFixedPairOnSameTeam and assertValidRound helpers. All four acceptance criteria are covered with clear test names and assertions:

  • 10 rounds, same team — loops 10 getNextRound calls with history and asserts pair a/b stay teammates or sit out together each round.
  • Two fixed pairs + unpaired — 10 players, 2 courts, 5 rounds; validates round structure/partitioning and both fixed pairs.
  • Atomic sit-outs — 6 players / 1 court forces 2 sit-outs; asserts length and paired sit-out behavior across 10 rounds.
  • Mid-game regenerate — 5 rounds without fixed pairs, then regenerates the last round with [["a","b"]] and asserts they stay together.

Retains the volunteer sit-out pull-through test. Scope is limited to test/heuristics.spec.tsx. Local CI: test:ci (18 passed), build, and lint all green (pre-existing hook warnings only). GitHub CI also passing.

@javaisbetterthanpython javaisbetterthanpython merged commit c2ed72c into main Jun 7, 2026
1 check passed
@javaisbetterthanpython javaisbetterthanpython deleted the issue-9-tests-fixed-pairs branch June 8, 2026 15:57
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.

Tests — fixed pairs

1 participant