Skip to content

Commit

Permalink
test: prevent state modifications in afterEach
Browse files Browse the repository at this point in the history
  • Loading branch information
lislon committed Nov 17, 2024
1 parent 88fa2eb commit 8f21dad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-router/tests/router.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {
import type { AnyRoute, AnyRouter, RouterOptions } from '../src'

afterEach(() => {
// @ts-ignore
window.__TSR__ROUTER__.history.destroy()
vi.resetAllMocks()
window.history.replaceState(null, 'root', '/')
cleanup()
Expand Down

0 comments on commit 8f21dad

Please sign in to comment.