From a180c850a9200adeeb7f3fc56b43692bbe8fcba1 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Mon, 6 Nov 2023 18:44:04 -0800 Subject: [PATCH] Add extra require to ensure that the next line doesn't panic if the string isn't present, since that interferes with gotestsum --- client/client_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/client_test.go b/client/client_test.go index 5a263eb..02f1204 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -1652,6 +1652,7 @@ func testTui_resize(t *testing.T) { {Keys: "hishtory SPACE tquery ENTER"}, {ResizeX: 300, ResizeY: 100}, }) + require.Contains(t, out, "hishtory tquery") out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1]) testutils.CompareGoldens(t, out, "TestTui-Resize") @@ -1669,6 +1670,7 @@ func testTui_resize(t *testing.T) { {Keys: "hishtory SPACE tquery ENTER"}, {Keys: "1234567890qwertyuip1234567890qwertyuip1234567890qwertyuip1234567890qwertyuip1234567890qwertyuip"}, }) + require.Contains(t, out, "hishtory tquery") out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1]) testutils.CompareGoldens(t, out, "TestTui-LongQuery") }