From 14a8fd103269e799097f08a9ec425cd297cf7619 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Thu, 23 Jul 2026 08:53:15 -0400 Subject: [PATCH] Deflake TestBuyTakesCardAndRefills by pinning an effect-less shop pet. --- internal/game/game_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/game/game_test.go b/internal/game/game_test.go index f1547d4..8a118c3 100644 --- a/internal/game/game_test.go +++ b/internal/game/game_test.go @@ -56,6 +56,9 @@ func TestLobbyStartsWhenFull(t *testing.T) { func TestBuyTakesCardAndRefills(t *testing.T) { g, _, _ := testGame(t) p := current(g) + // Pin the slot to an effect-less pet: a random draw could be a buy-apple + // pet (e.g. Otter), which would add an apple and make len(deck) != 1. + g.ShopRow[0] = g.pet("Plain", 3) want := g.ShopRow[0] deckBefore := len(g.ShopDecks[0]) if err := g.Buy(p.ID, 0); err != nil {