TestEmptyRunesKeyIsDropped: KeyMsg{Type: KeyRunes, Runes: nil} arises when bubbletea's parser chokes on a partial escape sequence. Falling through inserts nothing but triggers recomputeLayout: a stream of them flickers the UI, so drop them at the front door.
(t *testing.T)
| 2874 | out2, _ := om.update(tea.WindowSizeMsg{Width: 80, Height: 24}) |
| 2875 | om2 := out2.(Model) |
| 2876 | if joined2 := strings.Join(om2.outbox, "\n"); strings.Contains(joined2, "hamr time") { |
| 2877 | t.Fatalf("splash must be a one-shot, got re-emit: %s", joined2) |
| 2878 | } |
| 2879 | } |
| 2880 | |
| 2881 | // TestStreamingShownInLiveView: the streaming buffer is rendered above |
| 2882 | // the prompt by View() while content is in flight, so the user sees |
| 2883 | // tokens immediately even before the block flushes to scrollback. |
| 2884 | func TestStreamingShownInLiveView(t *testing.T) { |
| 2885 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 2886 | m.streaming.WriteString("live tokens arriving...") |
| 2887 | if !strings.Contains(stripANSI(m.View()), "live tokens arriving") { |
nothing calls this directly
no test coverage detected