mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-30 20:50:50 +02:00
Fix race condition in tests introduced by a79d401058
The race condition stems from the fact that queries are now async, so there is a chance this test hits ENTER before the new search queries have come in.
This commit is contained in:
@ -1825,7 +1825,7 @@ func TestTui(t *testing.T) {
|
||||
// Check the output when there is a selected result
|
||||
out = captureTerminalOutput(t, tester, []string{
|
||||
"hishtory SPACE tquery ENTER",
|
||||
"ls ENTER",
|
||||
"ls", "ENTER",
|
||||
})
|
||||
out = strings.Split(strings.TrimSpace(strings.Split(out, "hishtory tquery")[1]), "\n")[0]
|
||||
expected := `ls ~/`
|
||||
|
Reference in New Issue
Block a user