Skip to content

Commit

Permalink
feat: adds getter for program field in TestModel (#54)
Browse files Browse the repository at this point in the history
* feat: adds getter for program field in TestModel

* Update exp/teatest/teatest.go

---------

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
UncleGedd and caarlos0 authored May 14, 2024
1 parent 36f8ff3 commit 0126bdc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions exp/teatest/teatest.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ func (tm *TestModel) Type(s string) {
}
}

// GetProgram gets the TestModel's program.
func (tm *TestModel) GetProgram() *tea.Program {
return tm.program
}

// RequireEqualOutput is a helper function to assert the given output is
// the expected from the golden files, printing its diff in case it is not.
//
Expand Down

0 comments on commit 0126bdc

Please sign in to comment.