(t *testing.T)
| 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 | |
| 260 | func 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() |
nothing calls this directly
no test coverage detected