From efaf95ff08b0dbc2cdb85e8c74cd6606df1d0afb Mon Sep 17 00:00:00 2001 From: William Volin Date: Mon, 18 Nov 2024 18:38:22 -0700 Subject: [PATCH] fix: restore slug on test after each --- pages/game/[slug].test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pages/game/[slug].test.ts b/pages/game/[slug].test.ts index 0a8859b1..4f911442 100644 --- a/pages/game/[slug].test.ts +++ b/pages/game/[slug].test.ts @@ -17,6 +17,11 @@ const leaderboard: LeaderboardViewModel = { vi.mock('composables/api/useGetLeaderboardBySlug') +afterEach(() => { + fetchMock.resetMocks() + vi.restoreAllMocks() +}) + describe('/game/:slug', () => { it('should render without crashing with a valid leaderboard', async () => { vi.mocked(useGetLeaderboardBySlug).mockResolvedValue({