mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This alters the behavior of the subrequest check to allow for 5 recursive calls to match Vercel production, ref [Slack thread](https://pinglabsworkspace.slack.com/archives/C052S77L05C/p1694729495655489). > [!NOTE] > Currently limited by fetches having to forward the subrequest header for each request which isn't ideal. Need some assistant on how to access the request in the module context fetch override. > No forwarding:  > With forwarding:  --------- Co-authored-by: JJ Kasper <[email protected]>
19 lines
381 B
TypeScript
19 lines
381 B
TypeScript
import { createNextDescribe } from 'e2e-utils'
|
|
|
|
const bathPath = process.env.BASE_PATH ?? ''
|
|
|
|
createNextDescribe(
|
|
'app-routes-subrequests',
|
|
{
|
|
files: __dirname,
|
|
skipDeployment: true,
|
|
},
|
|
({ next }) => {
|
|
it('shortcuts after 5 subrequests', async () => {
|
|
expect(JSON.parse(await next.render(bathPath + '/'))).toEqual({
|
|
count: 5,
|
|
})
|
|
})
|
|
}
|
|
)
|