Skip to content

docs: improve LEVEL section with practical Test2 examples#1072

Draft
Koan-Bot wants to merge 1 commit intoTest-More:masterfrom
Koan-Bot:koan.atoomic/fix-level-docs-testbuilder
Draft

docs: improve LEVEL section with practical Test2 examples#1072
Koan-Bot wants to merge 1 commit intoTest-More:masterfrom
Koan-Bot:koan.atoomic/fix-level-docs-testbuilder

Conversation

@Koan-Bot
Copy link

@Koan-Bot Koan-Bot commented Mar 13, 2026

What

Rewrites the LEVEL section in Test2::Manual::Tooling::TestBuilder with practical, self-contained examples.

Why

Issue #1055: the section explained that the context system replaces $Test::Builder::Level but never showed how. Users migrating wrapper functions from Test::Builder to Test2 had to piece together docs across multiple modules.

How

  • Added a complete is_json wrapper example showing context auto-propagation (the common case - no level adjustment needed)
  • Added level => N edge-case example for callbacks/wrappers
  • Added a note that $Test::Builder::Level requires Test::Builder to be loaded (a gotcha not previously mentioned)
  • Split into subsections (The Test2 way, Edge case, Legacy compatibility) for scanability

Testing

  • Full test suite passes (370 files, 3470 assertions)
  • POD validation clean

Fixes #1055

🤖 Generated with Claude Code


Quality Report

Changes: 1 file changed, 53 insertions(+), 2 deletions(-)

Code scan: clean

Tests: passed (OK)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

The LEVEL section in Test2::Manual::Tooling::TestBuilder told users
that the context system "solves the problem" but never showed how.
Users migrating from Test::Builder were left guessing.

Add self-contained examples showing:
- How context() auto-propagates to nested tools (the common case)
- The level parameter for callback/wrapper edge cases
- A note that $Test::Builder::Level requires Test::Builder to be loaded

Fixes Test-More#1055
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.

LEVEL section in Test2::Manual::Tooling::TestBuilder has multiple issues

1 participant