Fix tests

pull/268/head
Anton Medvedev 9 months ago
parent 91cfbb11cc
commit 2c634b27d1
No known key found for this signature in database

@ -129,7 +129,7 @@ func main() {
fileName: fileName,
digInput: digInput,
searchInput: searchInput,
search: NewSearch(),
search: newSearch(),
}
p := tea.NewProgram(m, tea.WithAltScreen(), tea.WithMouseCellMotion())
@ -714,7 +714,7 @@ func (m *model) dig(value string) *node {
}
func (m *model) doSearch(s string) {
m.search = NewSearch()
m.search = newSearch()
if s == "" {
return

@ -29,9 +29,11 @@ func TestOutput(t *testing.T) {
require.NoError(t, err)
m := &model{
top: head,
head: head,
wrap: true,
top: head,
head: head,
wrap: true,
showCursor: true,
search: newSearch(),
}
tm := teatest.NewTestModel(
t, m,

@ -8,7 +8,7 @@ type search struct {
keys map[*node][]match
}
func NewSearch() *search {
func newSearch() *search {
return &search{
results: make([]*node, 0),
values: make(map[*node][]match),

Loading…
Cancel
Save