Skip to content

Commit 37f7364

Browse files
committed
Move comments around
1 parent e18af11 commit 37f7364

File tree

1 file changed

+4
-4
lines changed
  • packages/next/src/experimental/testmode/playwright

1 file changed

+4
-4
lines changed

packages/next/src/experimental/testmode/playwright/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ export default defineConfig({
5050
import { test, expect } from 'next/experimental/testmode/playwright'
5151

5252
test('/product/shoe', async ({ page, next }) => {
53+
// NOTE: `next.onFetch` only intercepts external `fetch` requests (for both client and server).
54+
// For example, if you `fetch` a relative URL (e.g. `/api/hello`) from the client
55+
// that's handled by a Next.js route handler (e.g. `app/api/hello/route.ts`),
56+
// it won't be intercepted.
5357
next.onFetch((request) => {
54-
// `next.onFetch` only intercepts external fetch requests (for both client and server).
55-
// For example, if you `fetch` a relative URL (e.g. `/api/hello`) from the client
56-
// that's handled by a Next.js route handler (e.g. `app/api/hello/route.ts`),
57-
// it won't be intercepted.
5858
if (request.url === 'http://my-db/product/shoe') {
5959
return new Response(
6060
JSON.stringify({

0 commit comments

Comments
 (0)