Skip to content

Commit 5ffcb02

Browse files
ci: apply automated fixes
1 parent 1c71b27 commit 5ffcb02

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Diff for: e2e/react-router/basic-file-based-code-splitting/tests/app.spec.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@ test('Navigating to a not-found route', async ({ page }) => {
3232
await expect(page.getByRole('heading')).toContainText('Welcome Home!')
3333
})
3434

35-
test('Navigating to a route where the lazy component fails to load', async ({ page }) => {
35+
test('Navigating to a route where the lazy component fails to load', async ({
36+
page,
37+
}) => {
3638
// block (and count) all requests to the posts.index route component
3739
let requested = 0
3840
await page.route('**/assets/posts.index-*', (route) => {
3941
requested++
4042
return route.fulfill({
4143
status: 404,
4244
contentType: 'text/plain',
43-
body: 'Not Found!'
45+
body: 'Not Found!',
4446
})
4547
})
4648

@@ -59,7 +61,7 @@ test('Navigating to a route where the lazy component fails to load', async ({ pa
5961
expect(requested).toBe(2)
6062
}).toPass({
6163
intervals: [50],
62-
timeout: 3000
64+
timeout: 3000,
6365
})
6466

6567
// the error component should be rendered

Diff for: packages/react-router/src/lazyRouteComponent.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ import type { AsyncRouteComponent } from './route'
77
// If this happens, the old version in the user's browser would have an outdated
88
// URL to the lazy module.
99
// In that case, we want to attempt one window refresh to get the latest.
10-
function getModuleNotFoundErrorKey(error: any, importerName?: string): string | false {
10+
function getModuleNotFoundErrorKey(
11+
error: any,
12+
importerName?: string,
13+
): string | false {
1114
// chrome: "Failed to fetch dynamically imported module: http://localhost:5173/src/routes/posts.index.tsx?tsr-split"
1215
// firefox: "error loading dynamically imported module: http://localhost:5173/src/routes/posts.index.tsx?tsr-split"
1316
// safari: "Importing a module script failed."

0 commit comments

Comments
 (0)