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

Function TestContentListSelectedPosting

internal/tui/tui_test.go:252–260  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

250 m := modelWithBoxes()
251 m.saveHelpHidden = func(bool) error { return errors.New("read-only file system") }
252
253 updated, _ := m.Update(keyPress("?"))
254 m = updated.(model)
255 if !strings.Contains(stripANSI(m.help.view()), "Could not save the help preference") {
256 t.Errorf("help preference failure is not visible: %q", m.help.view())
257 }
258}
259
260func TestModelResizesContentWhenThreadHelpChangesHeight(t *testing.T) {
261 for _, width := range []int{32, 40, 48, 64, 80, 100} {
262 t.Run(strconv.Itoa(width), func(t *testing.T) {
263 m := modelWithBoxes()

Callers

nothing calls this directly

Calls 4

setPostingsMethod · 0.95
selectedPostingMethod · 0.95
testPostingsFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected