stubPS replaces claude.PSRunner with a canned-output stub so the live-session guard in cmdDo can be exercised without touching the real process table. Replaces the legacy app-package `psRunner` override the test suite used before the harness refactor.
(t *testing.T, output string)
| 21 | // live-session guard in cmdDo can be exercised without touching the |
| 22 | // real process table. Replaces the legacy app-package `psRunner` |
| 23 | // override the test suite used before the harness refactor. |
| 24 | func stubPS(t *testing.T, output string) { |
| 25 | t.Helper() |
| 26 | old := claude.PSRunner |
| 27 | claude.PSRunner = func() ([]byte, error) { |
| 28 | return []byte(output), nil |
| 29 | } |
| 30 | t.Cleanup(func() { claude.PSRunner = old }) |
| 31 | } |
| 32 | |
| 33 | // stubNewUUID pins claude.NewUUID to a fixed value for the duration |
no outgoing calls
no test coverage detected