teatest

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL