Skip to content

test: mark each test's steps with Given, When and Then comments - #25

Merged
ancelin-code merged 1 commit into
developfrom
test/given-when-then
Oct 23, 2026
Merged

ancelin-code merged 1 commit into
developfrom
test/given-when-then

Conversation

@ancelin-code

Copy link
Copy Markdown
Owner

Summary

Every behavioural test in tests/unit/ now marks its steps with # Given, # When and # Then comments, each followed by a short phrase saying what the step sets up, does or checks. This is the style test_delivery_implement_scripts.py already used; it is now applied across the suite.

  • # Given is left out when there is nothing to set up.
  • A few tests that check a progression (for example a milestone going merged → reviewing → closed) have several When/Then pairs.
  • About fifteen tests called a script and asserted on the same line (assert launch(...).returncode == OK). They are split into result = ... then assert, so the action and the check stand apart. No assertion changed.
  • AGENTS.md records the convention for new tests.

Validation

  • mise run lint: clean
  • mise run test: 355 passed

Every behavioural test now names what it sets up, does and checks, the
style test_delivery_implement_scripts.py already used. Calls asserted on
the same line are split so the action and the check stand apart.
AGENTS.md records the convention for new tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ancelin-code ancelin-code added the ai-assisted AI agents worked on this change label Oct 23, 2026
@ancelin-code
ancelin-code merged commit bc3e7e0 into develop Oct 23, 2026
5 checks passed
@ancelin-code
ancelin-code deleted the test/given-when-then branch October 23, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted AI agents worked on this change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant