From 4e3b25e2fc4ffdb9c2e2e162e9d39dfb60475db7 Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Wed, 1 Apr 2026 12:20:16 -0700 Subject: [PATCH] fix: avoid global mock clearing in EditTournamentForm tests Replace mock.clearAllMocks() with mockFetch.mockClear() to only clear the specific fetch mock without affecting global module mocks used by other test files. --- src/__tests__/EditTournamentForm.test.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/__tests__/EditTournamentForm.test.tsx b/src/__tests__/EditTournamentForm.test.tsx index b578c3f..85e16d9 100644 --- a/src/__tests__/EditTournamentForm.test.tsx +++ b/src/__tests__/EditTournamentForm.test.tsx @@ -40,7 +40,8 @@ const mockTournament = { describe('EditTournamentForm', () => { beforeEach(() => { - mock.clearAllMocks() + // Only clear the specific mocks we create, not global module mocks + mockFetch.mockClear() }) it('renders form with initial values', () => {