Skip to content

test: add full coverage for fetch command paths#32

Merged
satoshai-dev merged 1 commit intomainfrom
test/fetch-command-full-coverage
Feb 24, 2026
Merged

test: add full coverage for fetch command paths#32
satoshai-dev merged 1 commit intomainfrom
test/fetch-command-full-coverage

Conversation

@satoshai-dev
Copy link
Copy Markdown
Owner

Summary

  • Comprehensive tests for all fetchCommand code paths: --stdout, --output, default file writing, multi-contract loop, and validation
  • Tests go from 31 → 38
  • Mocks writeFile to test file-writing branches without touching disk

Closes #6, closes #16

Test plan

  • pnpm test — 38 tests pass
  • pnpm typecheck — clean
  • pnpm lint — clean

🤖 Generated with Claude Code

- --stdout with TS and JSON output
- --stdout with multiple contracts (error)
- --output writing to specified file path
- --output with multiple contracts (error)
- default file writing (derives filename from contract name)
- default file writing with json format
- multi-contract loop writes separate files
- invalid format validation
- network validation before fetch

Tests go from 31 to 38.

Closes #6, closes #16

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@satoshai-dev satoshai-dev merged commit b2a03f9 into main Feb 24, 2026
1 check passed
@satoshai-dev satoshai-dev deleted the test/fetch-command-full-coverage branch February 24, 2026 18:37
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.

test: no coverage for --stdout and --output CLI paths test: fetch command has zero direct test coverage

1 participant