Expand description
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 the old bynkc crate.
Runners are found with crate::probe::detect and
crate::probe::DetectOpts::default() (no project-local search, no npx
fallback), the one detection implementation both CLIs share for
doctor/dev. #1758: each is spawned by the path detection resolved, not by
its bare name, so a Windows npm shim (tsc.cmd) runs, and a runner that is
found but won’t start is reported as such rather than as missing.
Structs§
- Test
Args - The
testsubcommand’s flags — the one contractbynk test#[command(flatten)]s (review findings #40/#72/#20/#21 remainder), replacing independent hand-spellings in each CLI. Field docs here are the CLI help text for both commands’ flags.
Enums§
- Test
Format test --formatselector, used bybynk 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§
- discover_
cases - Every (suite, case) the projects at
membersdeclare, by discovery, to judge a--suite/--casevalue against.Nonewhen any member does not compile or answers something else: the runs report that, and a value is not judged against a partial picture. - 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 ("bynk") so they read the same as before the move.