Most commands in packages/cli/src/commands/ have a matching test file (config.test.ts, incident.test.ts, init.test.ts, services.test.ts, start.test.ts, usage.test.ts), but these don't:
ask.ts
errors.ts
export.ts
logs.ts
metrics.ts
prune.ts
traces.ts
CONTRIBUTING.md asks for new commands to ship with a <command>.test.ts — these just predate that.
prune.ts and errors.ts are the smallest, good place to start. services.test.ts / usage.test.ts show the pattern: spin up a temp SQLite store, run the command, check the output/state. One or two commands per PR is fine.
Most commands in
packages/cli/src/commands/have a matching test file (config.test.ts,incident.test.ts,init.test.ts,services.test.ts,start.test.ts,usage.test.ts), but these don't:ask.tserrors.tsexport.tslogs.tsmetrics.tsprune.tstraces.tsCONTRIBUTING.md asks for new commands to ship with a
<command>.test.ts— these just predate that.prune.tsanderrors.tsare the smallest, good place to start.services.test.ts/usage.test.tsshow the pattern: spin up a temp SQLite store, run the command, check the output/state. One or two commands per PR is fine.