Expand description
bynkc test / bynk test’s shared command body (Wave 5 §5.4, findings
#40/#72/#20/#21 remainder): compile the project’s test declarations, write
them, and run them via tsc → node (falling back to tsx), folding the
result into the pinned crate::test_json::TestRun document in
--format json mode. Moved down from bynkc — both bynkc and bynk
need one implementation instead of two.
tool_exists (a bare PATH check) is replaced by crate::probe::detect
with crate::probe::DetectOpts::default() (no project-local search, no
npx fallback) — behaviourally identical to the old check, routed through
the one detection implementation both CLIs already share for doctor/dev.
Structs§
- Test
Args - The
testsubcommand’s flags — the one contractbynkc testandbynk testboth#[command(flatten)](review findings #40/#72/#20/#21 remainder), replacing four independent hand-spellings (bynkc::cli,bynk::cli,bynk::test::TestArgs, and the argv-literal rebuild that turned the latter back into flags for thebynkcshell-out) with one. Field docs here are the CLI help text for both commands’ flags.
Enums§
- Test
Format test --formatselector, shared bybynkc testandbynk test(review findings #40/#72): one enum both CLIs’Testsubcommand uses, instead of two structurally-identical copies that must be hand-kept in sync.
Functions§
- run_
test - In
--format jsonmode the deterministic surface is the document on stdout, so a<program> test:line on stderr is fine but must never reach stdout.programprefixes stderr messages ("bynkc"or"bynk") so they read the same as before the move.