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

Function TestTranscriptCmdNoSession

internal/app/transcript_test.go:19–35  ·  view source on GitHub ↗

Parser-level tests live in internal/harness/claude/transcript_test.go (the claude jsonl format is owned by the harness impl). The tests here exercise the cmdTranscript wiring: ref resolution, the "no session" gate, the happy-path dispatch into the harness, and the retrospective-bind full-render guar

(t *testing.T)

Source from the content-addressed store, hash-verified

17// retrospective-bind full-render guarantee.
18
19func TestTranscriptCmdNoSession(t *testing.T) {
20 tmp := t.TempDir()
21 t.Setenv("FLOW_ROOT", filepath.Join(tmp, "flow"))
22 t.Setenv("HOME", tmp)
23
24 oldOsa := iterm.Runner
25 iterm.Runner = func(args []string) error { return nil }
26 t.Cleanup(func() { iterm.Runner = oldOsa })
27
28 cmdInit(nil)
29 cmdAdd([]string{"task", "No Session Task", "--slug", "no-session"})
30
31 rc := cmdTranscript([]string{"no-session"})
32 if rc != 1 {
33 t.Errorf("transcript with no session: rc=%d, want 1", rc)
34 }
35}
36
37func TestTranscriptCmdWithSession(t *testing.T) {
38 tmp := t.TempDir()

Callers

nothing calls this directly

Calls 3

cmdInitFunction · 0.85
cmdAddFunction · 0.85
cmdTranscriptFunction · 0.85

Tested by

no test coverage detected