Skip to content

Commit a68bf5b

Browse files
rootroot
authored andcommitted
Wait for router to load before starting to test
1 parent 475c6d6 commit a68bf5b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ test('reproducer #4245', async () => {
359359

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

362+
await router.load()
363+
362364
// We wait for the initial loader to complete
363365
const fooLink = await screen.findByRole('link', { name: 'foo' }, { timeout: LOADER_WAIT_TIME + WAIT_TIME })
364366
expect(fooLink).toBeInTheDocument()

0 commit comments

Comments
 (0)