Skip to content

Commit

Permalink
fix: restore slug on test after each
Browse files Browse the repository at this point in the history
  • Loading branch information
Eein committed Nov 19, 2024
1 parent e040e98 commit efaf95f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pages/game/[slug].test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit efaf95f

Please sign in to comment.