Skip to content

Fix tests and enable CI#13

Merged
guodong-sq merged 2 commits intomainfrom
guodong/fix_tests_and_enable_CI
Feb 9, 2026
Merged

Fix tests and enable CI#13
guodong-sq merged 2 commits intomainfrom
guodong/fix_tests_and_enable_CI

Conversation

@guodong-sq
Copy link
Copy Markdown
Collaborator

@guodong-sq guodong-sq commented Feb 9, 2026

Summary

  • Fix 4 failing test assertions to match actual error messages from production code
  • Redirect stdin in empty-argument tests to prevent blocking on interactive prompts in CI
  • Add GitHub Actions workflow to run BATS tests on PRs, push to main, and nightly
  • Add CI badge to README

Test plan

  • All 167 BATS tests pass in CI
  • Badge renders on README after first workflow run

- Fix 3 tests with assertion strings that didn't match actual error
  messages from wt_resolve_and_validate() ("does not exist" → "not
  found", "not a working tree" → "not a git repository or worktree")
- Fix e2e context switching test that sourced wt-context without first
  sourcing wt-common, causing wt_read_config to be undefined (exit 127)
- Redirect stdin from /dev/null in empty-argument tests to prevent
  interactive select_git_worktree from blocking on read in CI
Run BATS test suite on every PR, push to main, and nightly at 8am UTC.
@guodong-sq guodong-sq merged commit ec015e9 into main Feb 9, 2026
2 checks passed
@guodong-sq guodong-sq deleted the guodong/fix_tests_and_enable_CI branch March 10, 2026 06:25
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