summaryrefslogtreecommitdiff
path: root/internal/tui
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-08 11:40:55 +0200
committerPaul Buetow <paul@buetow.org>2026-03-08 11:40:55 +0200
commitbe5718d6e0de0f7ce3b4b506f389719542a46ea7 (patch)
treea9af41a1fb97aeedb619f929e14bd66db091e982 /internal/tui
parent534d55c47fc29d1089cb5c2c9c4832461e762603 (diff)
tests: remove sleep-based waits in tui and runtime tests
Diffstat (limited to 'internal/tui')
-rw-r--r--internal/tui/tui_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/tui/tui_test.go b/internal/tui/tui_test.go
index 82fe9da..85ebb71 100644
--- a/internal/tui/tui_test.go
+++ b/internal/tui/tui_test.go
@@ -612,7 +612,8 @@ func TestNormalizeKeyEventReleaseFallbackSuppressesImmediatePressOnly(t *testing
t.Fatalf("expected immediate matching press to be suppressed, got %T", normalized)
}
- time.Sleep(70 * time.Millisecond)
+ // Expire suppression deterministically instead of waiting on wall clock time.
+ m.suppressPressUntil = time.Now().Add(-time.Nanosecond)
if normalized, ok = m.normalizeKeyEvent(tea.KeyPressMsg{Code: tea.KeySpace, Text: " "}); !ok {
t.Fatalf("expected press to be accepted after suppression window")
}