Skip to content

test(#86): Add CLI integration test for version output - #101

Merged
admarble merged 1 commit into
mainfrom
feature/86-test-add-cli-integration-test-for-version-outpu
Jan 17, 2026
Merged

admarble merged 1 commit into
mainfrom
feature/86-test-add-cli-integration-test-for-version-outpu

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Adds integration tests that run the actual built CLI to verify version output
  • Tests --version, -V, and status command all report correct package.json version
  • Guards against the 0.0.0 fallback bug that occurred in v1.5.4

Background

Issue #86 was created after a bug in getCurrentVersion() returned 0.0.0 instead of the actual version. Unit tests passed because they mocked fs, but the real CLI had path resolution issues.

Test plan

  • npm test - 366 tests pass (3 new + 1 skipped)
  • npm run build - Build succeeds
  • Integration tests verify actual CLI output matches package.json

AC Coverage

AC Description Status
AC-1 Integration test runs built CLI MET
AC-2 Verifies --version matches package.json MET
AC-3 Verifies status shows correct package version MET
AC-4 Test runs as part of npm test MET
AC-5 Test skipped if dist/ doesn't exist MET (via describe.skipIf)

Closes #86

🤖 Generated with Claude Code

Add integration tests that run the actual built CLI to verify version
output matches package.json. This catches path resolution bugs that
unit tests with mocks miss.

Tests added:
- --version flag reports correct version
- -V short flag reports correct version
- status command shows Package version: X.X.X
- Guard against 0.0.0 fallback appearing

Closes #86

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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: Add CLI integration test for version output

1 participant