Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(teatest): lint issues #302

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions exp/teatest/teatest.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func WaitFor(
func doWaitFor(r io.Reader, condition func(bts []byte) bool, options ...WaitForOption) error {
wf := WaitingForContext{
Duration: time.Second,
CheckInterval: 50 * time.Millisecond, //nolint: gomnd
CheckInterval: 50 * time.Millisecond, //nolint: mnd
}

for _, opt := range options {
Expand Down Expand Up @@ -275,7 +275,7 @@ func (tm *TestModel) GetProgram() *tea.Program {
// You can update the golden files by running your tests with the -update flag.
func RequireEqualOutput(tb testing.TB, out []byte) {
tb.Helper()
golden.RequireEqualEscape(tb, out, true)
golden.RequireEqual(tb, out)
}

func safe(rw io.ReadWriter) io.ReadWriter {
Expand Down
4 changes: 2 additions & 2 deletions exp/teatest/testdata/TestApp.golden
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[?25l[?2004hHi. This program will exit in 10 seconds. To quit sooner press any key
Hi. This program will exit in 9 seconds. To quit sooner press any key.
[?25l[?2004hHi. This program will exit in 10 seconds. To quit sooner press any key
Hi. This program will exit in 9 seconds. To quit sooner press any key.
[?2004l[?25h[?1002l[?1003l[?1006l
Expand Down
12 changes: 6 additions & 6 deletions exp/teatest/testdata/TestAppSendToOtherProgram.golden
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[?25l[?2004hAll pings:
from m1
from m1
from m2
from m2
from m2
[?25l[?2004hAll pings:
from m1
from m1
from m2
from m2
from m2
from m2[?2004l[?25h[?1002l[?1003l[?1006l
Expand Down
Loading