Skip to content

Fix create, load, and init command test harnesses and cover multi-Connection resolution - #149

Merged
jrobinsonc merged 6 commits into
mainfrom
issue-143-fix-create-load-init-test-harnesses
Nov 15, 2026
Merged

jrobinsonc merged 6 commits into
mainfrom
issue-143-fix-create-load-init-test-harnesses

Conversation

@jrobinsonc

Copy link
Copy Markdown
Owner

Closes #143

Summary

src/commands/create.ts
├── progress?: typeof defaultProgress   # injectable progress reporter (avoids stderr noise in tests)
└── signals?: ProcessSignals            # injectable SIGINT/exit emitter (avoids process.emit on test runner)

tests/commands/
├── create.test.ts  # injects progress & signals, removes unused ask stub, covers multi-Connection resolution
├── load.test.ts    # covers multi-Connection resolution & CLI --force rejection (exit 2)
└── init.test.ts    # adds PTY end-to-end CLI test for rendered .env password advice

Evidence

  • Before: tests/commands/create.test.ts emitted Creating dump file... to stderr, stubbed ask with unused, and called process.emit('SIGINT', 'SIGINT') on the shared test runner; 177 pass, 0 fail.
    After: bun check, bun fmt --check, and bun test all pass with zero stderr noise (183 pass, 0 fail, 725 expect() calls).

Merge Danger

Door: two-way

Optional dependency injections (progress and signals) default to the existing production implementations (defaultProgress and process).

Blast Radius: low

Only create.ts dependency wiring and command test suites are modified.

@sonarqubecloud

Copy link
Copy Markdown

@jrobinsonc
jrobinsonc merged commit 6e46cc0 into main Nov 15, 2026
9 checks passed
@jrobinsonc
jrobinsonc deleted the issue-143-fix-create-load-init-test-harnesses branch November 15, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix create, load, and init command test harnesses and cover multi-Connection resolution

1 participant