Commit a8985b5
test(cli): assert help-flag normalization through dispatch equality
The pre-help-flag variants of every terminal path each spawned a guarded
subprocess, even though resolveDispatch normalizes them to the exact
dispatch the canonical `--help` run already executed with zero side
effects. Those runs re-verified canonical's own arguments and dominated
the runtime of this file.
Compare the normalized dispatch arguments against the canonical dispatch
instead, and keep the canonical guarded subprocess as the behavioral
evidence. Identical script plus identical arguments yields identical
execution, so the zero-side-effect contract stays covered.
Validated with node --test test/better-harness-cli.test.mjs.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>1 parent 515170a commit a8985b5
1 file changed
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
498 | 504 | | |
499 | 505 | | |
500 | 506 | | |
501 | 507 | | |
502 | 508 | | |
503 | 509 | | |
| 510 | + | |
504 | 511 | | |
505 | 512 | | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | 513 | | |
516 | 514 | | |
517 | 515 | | |
| |||
0 commit comments