From 5a41f876ff877a30dca8060f7585c0d7e088ddf5 Mon Sep 17 00:00:00 2001 From: Evan Jarrett Date: Thu, 30 Oct 2025 22:33:07 -0500 Subject: [PATCH] fix unit tests --- pkg/appview/db/models.go | 2 +- pkg/appview/jetstream/backfill_test.go | 12 ------------ pkg/appview/jetstream/worker_test.go | 13 ------------- pkg/appview/ui_test.go | 2 ++ 4 files changed, 3 insertions(+), 26 deletions(-) delete mode 100644 pkg/appview/jetstream/backfill_test.go delete mode 100644 pkg/appview/jetstream/worker_test.go diff --git a/pkg/appview/db/models.go b/pkg/appview/db/models.go index e5405ee..3bd4834 100644 --- a/pkg/appview/db/models.go +++ b/pkg/appview/db/models.go @@ -70,7 +70,7 @@ type Push struct { IconURL string StarCount int PullCount int - IsStarred bool // Whether the current user has starred this repository + IsStarred bool // Whether the current user has starred this repository CreatedAt time.Time HoldEndpoint string // Hold endpoint for health checking Reachable bool // Whether the hold endpoint is reachable diff --git a/pkg/appview/jetstream/backfill_test.go b/pkg/appview/jetstream/backfill_test.go deleted file mode 100644 index e892a77..0000000 --- a/pkg/appview/jetstream/backfill_test.go +++ /dev/null @@ -1,12 +0,0 @@ -package jetstream - -import "testing" - -func TestBackfillWorker_Struct(t *testing.T) { - backfiller := &BackfillWorker{} - if backfiller == nil { - t.Error("Expected non-nil backfiller") - } -} - -// TODO: Add backfill tests with mocked ATProto client diff --git a/pkg/appview/jetstream/worker_test.go b/pkg/appview/jetstream/worker_test.go deleted file mode 100644 index b71be39..0000000 --- a/pkg/appview/jetstream/worker_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package jetstream - -import "testing" - -func TestWorker_Struct(t *testing.T) { - // Simple struct test - worker := &Worker{} - if worker == nil { - t.Error("Expected non-nil worker") - } -} - -// TODO: Add WebSocket connection tests with mock server diff --git a/pkg/appview/ui_test.go b/pkg/appview/ui_test.go index aa5a7c8..e812215 100644 --- a/pkg/appview/ui_test.go +++ b/pkg/appview/ui_test.go @@ -562,6 +562,7 @@ func TestTemplateExecution_RepoCard(t *testing.T) { Description string StarCount int PullCount int + IsStarred bool }{ OwnerHandle: "alice.bsky.social", Repository: "myapp", @@ -569,6 +570,7 @@ func TestTemplateExecution_RepoCard(t *testing.T) { Description: "A cool container image", StarCount: 42, PullCount: 1337, + IsStarred: true, } buf := new(bytes.Buffer)