MCPcopy Create free account
hub / github.com/basecamp/hey-cli / TestJournalViewInThread

Function TestJournalViewInThread

internal/tui/journal_test.go:150–164  ·  view source on GitHub ↗

--- Thread state ---

(t *testing.T)

Source from the content-addressed store, hash-verified

148 t.Fatalf("search empty state = %q", got)
149 }
150 if cmd := v.HandleContentKey(keyPress("c")); cmd == nil || v.query != "" {
151 t.Fatalf("clear search = cmd:%v query:%q", cmd != nil, v.query)
152 }
153}
154
155func TestJournalSearchEscapeKeepsFeed(t *testing.T) {
156 v := loadedJournalView(journalEntries(1))
157 v.HandleContentKey(keyPress("/"))
158 v.prompt.input.SetValue("discard me")
159 v.HandleContentKey(keyPress("esc"))
160 if v.prompt != nil || v.query != "" || len(v.list.entries) != 1 {
161 t.Fatalf("cancelled search = prompt:%v query:%q entries:%d", v.prompt != nil, v.query, len(v.list.entries))
162 }
163}
164
165func TestJournalDateJumpValidatesAndLoads(t *testing.T) {
166 v := loadedJournalView(nil)
167 v.HandleContentKey(keyPress("g"))

Callers

nothing calls this directly

Calls 5

newJournalViewFunction · 0.85
testVCFunction · 0.85
InThreadMethod · 0.65
ExitThreadMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected