Files
anomalyco_opencode/packages/opencode
Kit Langton 4aa2a47ee2 test(cli): tier-A read-only command smoke tests
Adds smoke tests for the seven read-only commands that share the
run-shaped lifecycle:

  - mcp list
  - providers list
  - models
  - agent list
  - session list
  - stats
  - db path

Each test asserts only that the command exits 0 and produces sane
output in the harness's isolated env. They're not behavioral tests —
they're the cheapest possible signal that the dependency-layer wiring
(config load, DB init, server boot, provider resolution) doesn't crash
for the broad class of "no inputs, no side effects" commands. A
regression in any shared layer will fail one or more of these tests.

Pushes behavioral coverage of the CLI surface from ~14% to ~50%.

Findings while wiring assertions:

  - \`providers list\` reflects credentials + env vars, not
    config-injected static providers. The assertion verifies the
    section headers ("Credentials" / "Environment") to lock in the
    output shape.
  - \`db path\` returns SQLite's \`:memory:\` under harness isolation
    (no on-disk pollution between tests). The assertion accepts either
    \`:memory:\` or a real path.

7/7 pass in ~7s; full CLI suite stays green at 331/331.
2026-05-18 21:23:55 -04:00
..
2026-05-12 05:20:22 +00:00
2026-05-18 16:18:29 +00:00
2026-05-16 00:44:10 +00:00
2026-02-25 01:48:10 -05:00
2026-03-27 15:00:26 +01:00
2026-02-14 04:19:02 +00:00
2026-05-18 20:57:13 +00:00
2026-02-18 13:54:23 -05:00

js

To install dependencies:

bun install

To run:

bun run index.ts

This project was created using bun init in bun v1.2.12. Bun is a fast all-in-one JavaScript runtime.