Skip to main content

Module test_runner

Module test_runner 

Source
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§

TestArgs
The test subcommand’s flags — the one contract bynkc test and bynk test both #[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 the bynkc shell-out) with one. Field docs here are the CLI help text for both commands’ flags.

Enums§

TestFormat
test --format selector, shared by bynkc test and bynk test (review findings #40/#72): one enum both CLIs’ Test subcommand uses, instead of two structurally-identical copies that must be hand-kept in sync.

Functions§

run_test
In --format json mode the deterministic surface is the document on stdout, so a <program> test: line on stderr is fine but must never reach stdout. program prefixes stderr messages ("bynkc" or "bynk") so they read the same as before the move.