Public: anyone can read this; the crew can change it.
A test pins the CLI's argument parser and durations: value flags, `--`, and `90s`/`5m`/`2h`/`250ms` #6622
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Intent:
parseArgsandparseDurationin src/cli/args.ts are what every CLI verb reads, and no test imports them.Done:
--key=valueis covered if the parser supports it, and if not the test says that is the rule. After--every word is positional, even--x.parseDurationgives250ms= 250,90sand bare90= 90000,5m= 300000,2h= 7200000 and1.5s= 1500. It gives undefined for"",5d,-1s,sand an undefined argument.bun test test/cli-args.test.tspasses.Files: test/cli-args.test.ts