Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeadlessSession ¶
type HeadlessSession struct {
// contains filtered or unexported fields
}
HeadlessSession provides a simple headless testing interface for BubbleTea models.
func NewHeadlessSession ¶
func NewHeadlessSession(m tea.Model) *HeadlessSession
NewHeadlessSession creates a new headless session for a BubbleTea model.
func (*HeadlessSession) Output ¶
func (s *HeadlessSession) Output() string
Output returns the current string output from the model's View() method.
func (*HeadlessSession) Send ¶
func (s *HeadlessSession) Send(msg tea.Msg)
Send sends a message to the model's Update function.
func (*HeadlessSession) TypeString ¶
func (s *HeadlessSession) TypeString(str string)
TypeString sends a string of characters to the model.
func (*HeadlessSession) Wait ¶
func (s *HeadlessSession) Wait()
Wait a short duration for the model to process messages.
Click to show internal directories.
Click to hide internal directories.