diff --git a/workspace-server/internal/bundle/bundle_helpers_test.go b/workspace-server/internal/bundle/bundle_helpers_test.go index 9879570f..5bc5a248 100644 --- a/workspace-server/internal/bundle/bundle_helpers_test.go +++ b/workspace-server/internal/bundle/bundle_helpers_test.go @@ -45,9 +45,9 @@ func TestSplitLines_TrailingNewline(t *testing.T) { func TestSplitLines_Empty(t *testing.T) { got := splitLines("") - want := []string{""} - if len(got) != len(want) { - t.Errorf("empty string should produce one empty-string element; got %v", got) + // An empty string should return a single-element slice containing "" + if len(got) != 1 || got[0] != "" { + t.Errorf("empty string should produce one empty-string element; got %v (len=%d)", got, len(got)) } } diff --git a/workspace-server/internal/ws/hub_test.go b/workspace-server/internal/ws/hub_test.go index 28732651..6416ab6f 100644 --- a/workspace-server/internal/ws/hub_test.go +++ b/workspace-server/internal/ws/hub_test.go @@ -50,6 +50,10 @@ func TestNewHub_WithAccessChecker(t *testing.T) { if h.canCommunicate("ws-1", "ws-2") { t.Error("canCommunicate should return false for different IDs") } + // Verify the checker was invoked at least once + if !called { + t.Error("access checker was not called") + } } // ---------- safeSend ----------