Skip to content

Add tests: tui/shared, tui/app, and e2e integration suite - #4

Merged
jdforsythe merged 1 commit into
masterfrom
tests2
Apr 2, 2026
Merged

Add tests: tui/shared, tui/app, and e2e integration suite#4
jdforsythe merged 1 commit into
masterfrom
tests2

Conversation

@jdforsythe

Copy link
Copy Markdown
Owner

Summary

  • internal/tui/shared — unit tests for IsQuit, screen/key constants, and RenderHeader (19 tests across 2 files)
  • internal/tui/app — BubbleTea model tests for constructors, all Update message routing (CtrlC, ErrorMsg, LaunchProfile, WindowSize, screen switches, DeleteProfile), and View rendering (18 tests)
  • test/integration — new e2e CLI suite that builds the jig binary in TestMain and exercises every command as a subprocess with isolated HOME and working directories (27 tests)

Commands covered by integration tests

  • jig init (fresh dir + already-initialized)
  • jig profiles create / list / show / validate / export / delete
  • jig doctor (with and without a claude binary on PATH via fake shell script)
  • jig run --dry-run (profile found, not found, typo suggestion, missing args)

Test plan

  • go test ./internal/tui/shared/... — 19 tests pass
  • go test ./internal/tui/... — 18 new + existing tests pass
  • go test ./test/integration/... -v — 27 tests pass
  • go test ./... — full suite green

🤖 Generated with Claude Code

- internal/tui/shared: unit tests for IsQuit, screen/key constants, RenderHeader
- internal/tui/app: BubbleTea model tests for New, NewPickerApp, Update message
  routing (CtrlC, ErrorMsg, LaunchProfile, WindowSize, screen switches,
  DeleteProfile), and View rendering
- test/integration: e2e CLI tests that build the jig binary in TestMain and
  exercise all commands (init, profiles create/list/show/validate/export/delete,
  doctor, run --dry-run) via subprocess with isolated HOME and working directories

Closes all identified test gaps: cmd/jig, internal/tui/app.go, internal/tui/shared

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jdforsythe
jdforsythe merged commit 17d4ee8 into master Apr 2, 2026
1 check passed
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.

1 participant