Repository navigation
test: skip the mouse-safety suite when the addon does not load - #39
Conversation
Gate it with nativeSupport() like test/terminal.test.ts and test/workers.test.ts, so npm test without a built addon exits 0. Update the README notes that said the suite fails without the addon. Signed-off-by: Thomas Kosiewski <tk@coder.com> --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `medium`_ Change-Id: I4f0c73de4ee08eea111ef47e10792334768a301d
|
Verdict: PASS+NOTES Parent is Scenario:
Revert test. At the head I changed only Gate at the head (all exit 0, each with
Diff. It changes three files. Notes
Generated with |
cursorVisible first ships in this release, so it was never optional in a published version. The #39 bullet only changed a test. _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_ Change-Id: I9407e114ee961f9392f37b4afecafe2a774a0c4c Signed-off-by: Thomas Kosiewski <tk@coder.com>
Why
The goal is to fix four small leftovers from the mouse-encoding PR (#12). This PR fixes one of them.
npm testwithout a built addon fails, becausetest/mouse-safety.test.tshas no skip gate.test/terminal.test.tsandtest/workers.test.tsskip their native suites when the addon does not load.What changed
test/mouse-safety.test.tsgates itsdescribe.eachwithnativeSupport(), the same way the other two native test files gate their suites.native/README.mdandsrc/README.mdnow say the file skips like the other native suites.src/README.mdadds it to the list of suites that skip.Scope
Only the gate and the two README notes change. The 12 tests are unchanged.
Blast Radius
Tests and docs only. No package code changes. With the addon built, the suite runs as before.
Verification
Without an addon (no
build/), on main at bf41459,npx vitest runexits 1:On this branch, with
build/moved out of the checkout,npx vitest runexits 0:With the addon built, every gate exits 0. Each one runs the 12 mouse-safety tests (
✓ test/mouse-safety.test.ts (12 tests)) and passes 67 of 67 tests:npm ci && npm run build:native && npm run build && npm run verifyagainst a ReleaseFast libghostty-vt.rm -rf dist, thennpm run build:nativewith-fsanitize=undefined,float-cast-overflow -fno-sanitize-recover=all, thennpm test && npm run smoke.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:medium