Skip to content

Commit 3f4b756

Browse files
committed
Update test
1 parent 380c842 commit 3f4b756

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

test/e2e/app-dir/proxy-missing-export/proxy-missing-export.test.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
import { nextTestSetup } from 'e2e-utils'
22

3-
const errorMessage =
4-
'The Proxy file "./proxy.ts" must export a function named `proxy` or a default function.'
3+
const errorMessage = `The Proxy file "./proxy.ts" must export a function named \`proxy\` or a default function.
4+
This function is what Next.js runs for every request handled by this proxy (previously called middleware).
5+
6+
Why this happens:
7+
- The file exists but doesn't export a function.
8+
- The export is not a function (e.g., an object or constant).
9+
- There's a syntax error preventing the export from being recognized.
10+
11+
To fix it:
12+
- Check your "proxy" file.
13+
- Ensure it has either a default or "proxy" function export.
14+
- Restart the dev server if the error persists.`
515

616
describe('proxy-missing-export', () => {
717
const { next, isNextDev, skipped } = nextTestSetup({

0 commit comments

Comments
 (0)