Documentation
¶
Overview ¶
Package test contains helper functions for prompt tests.
Index ¶
- Variables
- func AssertGoldenView(tb testing.TB, m tea.Model, expectedViewFile string)
- func Indent(text string) string
- func KeyMsg(r rune) tea.Msg
- func MsgsFromText(text string) []tea.Msg
- func Run(tb testing.TB, model tea.Model, events ...tea.Msg)
- func StripANSI(str string) string
- func Update(tb testing.TB, model tea.Model, event tea.Msg) tea.Cmd
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UpdateGoldenFiles specifies whether the golden files should be updated. UpdateGoldenFiles = flag.Bool("update", false, "update the golden files") // Inspect prints string mismatches escaped such that the differences can be // inspected in detail. Inspect = flag.Bool("inspect", false, "inspect strings in detail") )
Functions ¶
func AssertGoldenView ¶
AssertGoldenView compares the view to an exected view in an updatable golden file.
func MsgsFromText ¶
MsgsFromText generates KeyMsg events from a given text.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.