fix: stub hook send in tests for CI without /dev/tty

Avoid opening /dev/tty during unit tests so GitHub Actions can run
go test without a controlling terminal.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-26 12:53:50 +08:00
parent 56a189e678
commit 50453ba19c
3 changed files with 26 additions and 2 deletions
+1
View File
@@ -10,6 +10,7 @@ import (
)
func TestCursorStopHookDisabled(t *testing.T) {
stubCursorSend(t)
cfg := config.Default()
cfg.Events.Stop = false
err := RunCursor(bytes.NewReader([]byte(`{"workspace_roots":["/tmp/proj"]}`)), cfg, "stop", &bytes.Buffer{})