mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
574ac9f0f8
Extract the instant navigation testing API into a standalone @next/playwright package. The instant() helper lets Playwright tests assert on prefetched/cached UI by deferring dynamic data during navigations — similar to throttling the network in DevTools. The package is private: true for now. The goal is to get the scaffolding ready so we can flip it to public when the API is ready to ship. The existing inline implementation in the instant navigation test file is replaced with an import from @next/playwright. The nested scope test now exercises actual nested instant() calls rather than manipulating the cookie directly. The protocol is intentionally minimal (a single cookie) so that other testing frameworks and dev tools can replicate the behavior with minimal effort.
40 lines
1.2 KiB
JSON
40 lines
1.2 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"noEmit": true,
|
|
"strict": false,
|
|
"allowJs": true,
|
|
"esModuleInterop": true,
|
|
"resolveJsonModule": true,
|
|
"jsx": "react-jsx",
|
|
"module": "ESNext",
|
|
"target": "ESNext",
|
|
"moduleResolution": "node",
|
|
"types": ["react", "jest", "node", "trusted-types", "jest-extended"],
|
|
"paths": {
|
|
"development-sandbox": ["./test/lib/development-sandbox"],
|
|
"next-test-utils": ["./test/lib/next-test-utils"],
|
|
"next-webdriver": ["./test/lib/next-webdriver"],
|
|
"e2e-utils": ["./test/lib/e2e-utils"],
|
|
"e2e-utils/*": ["./test/lib/e2e-utils/*"],
|
|
"test-data-service/*": ["./test/lib/test-data-service/*"],
|
|
"test-log": ["./test/lib/test-log"],
|
|
"router-act": ["./test/lib/router-act"],
|
|
"@next/playwright": ["./packages/next-playwright/src/index.ts"]
|
|
}
|
|
},
|
|
"include": [
|
|
"run-tests.js",
|
|
"test/**/*.test.ts",
|
|
"test/**/*.test.tsx",
|
|
"test/**/*.util.ts",
|
|
"test/e2e/app-dir/use-cache-custom-handler/*.js",
|
|
"test/lib/**/*.ts",
|
|
"scripts/**/*.js",
|
|
"scripts/**/*.cjs",
|
|
"scripts/**/*.mjs",
|
|
"scripts/**/*.ts",
|
|
"turbo/**/*.ts"
|
|
],
|
|
"exclude": ["scripts/minimal-server.js"]
|
|
}
|