Skip to content

Commit f4a544f

Browse files
authored
test(solid-router): sync unit tests from react-router (#5614)
1 parent a068c43 commit f4a544f

File tree

9 files changed

+4000
-18
lines changed

9 files changed

+4000
-18
lines changed

packages/react-router/tests/useNavigate.test.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2520,24 +2520,6 @@ describe.each([{ basepath: '' }, { basepath: '/basepath' }])(
25202520
expect(window.location.pathname).toBe(`${basepath}/param/foo/a`)
25212521
})
25222522

2523-
test('should navigate to a parent link based on active location', async () => {
2524-
const router = setupRouter()
2525-
2526-
render(<RouterProvider router={router} />)
2527-
2528-
await act(async () => {
2529-
history.push(`${basepath}/param/foo/a/b`)
2530-
})
2531-
2532-
const relativeLink = await screen.findByTestId('link-to-previous')
2533-
2534-
// Click the link and ensure the new location
2535-
fireEvent.click(relativeLink)
2536-
await router.latestLoadPromise
2537-
2538-
expect(window.location.pathname).toBe(`${basepath}/param/foo/a`)
2539-
})
2540-
25412523
test('should navigate to same route with different params', async () => {
25422524
const router = setupRouter()
25432525

0 commit comments

Comments
 (0)