1package workspace
2
3import (
4 tea "charm.land/bubbletea/v2"
5)
6
7// ConsumeEventsForTest runs the event-handling loop on the given
8// channel, invoking send for translated domain messages and refreshing
9// the cached workspace snapshot on ConfigChanged. Exposed for
10// cross-package integration tests that cannot rely on a real
11// *tea.Program. It returns when evc is closed.
12func (w *ClientWorkspace) ConsumeEventsForTest(evc <-chan any, send func(tea.Msg)) {
13 w.consumeEvents(evc, send)
14}