MCPcopy Create free account
hub / github.com/Facets-cloud/flow / stubPS

Function stubPS

internal/app/do_test.go:23–30  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
24func 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

Calls

no outgoing calls

Tested by

no test coverage detected