feat: add E2E test suite with GitHub Actions CI#19
Merged
Conversation
Add comprehensive E2E test suite covering core plugin logic and
backend-specific integration tests.
Plugin tests (plenary busted):
- changes_registry_spec.lua — 6 tests for the changes module
- diff_lifecycle_spec.lua — 5 tests for the diff module
Backend integration tests (shell):
- backends/claude/ — Edit, Write, Bash, install, stale socket (14 tests)
- backends/opencode/ — Edit, Write, Bash, install (6 tests)
Also includes:
- GitHub Actions workflow (Ubuntu + macOS, Neovim 0.10.4)
- Fix: use ES module imports for writeFileSync/unlinkSync in
opencode-plugin/nvim.ts (replaces runtime require("fs") calls
that break in ESM context)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace `(( var++ ))` with `var=$((var + 1))` in test helpers. When var is 0, `(( var++ ))` evaluates to 0 (falsy) and returns exit code 1, which kills the script under `set -euo pipefail` on bash 5.x (Ubuntu CI). macOS bash 3.2 doesn't trigger this. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kam-hak
added a commit
to kam-hak/claude-preview.nvim
that referenced
this pull request
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
opencode-plugin/nvim.ts(use top-level imports instead of runtimerequire("fs"))Test structure
Running locally
Test plan
🤖 Generated with Claude Code