Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions packages/react-router/tests/useNavigate.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2520,24 +2520,6 @@ describe.each([{ basepath: '' }, { basepath: '/basepath' }])(
expect(window.location.pathname).toBe(`${basepath}/param/foo/a`)
})

test('should navigate to a parent link based on active location', async () => {
const router = setupRouter()

render(<RouterProvider router={router} />)

await act(async () => {
history.push(`${basepath}/param/foo/a/b`)
})

const relativeLink = await screen.findByTestId('link-to-previous')

// Click the link and ensure the new location
fireEvent.click(relativeLink)
await router.latestLoadPromise

expect(window.location.pathname).toBe(`${basepath}/param/foo/a`)
})

test('should navigate to same route with different params', async () => {
const router = setupRouter()

Expand Down
Loading
Loading