6d07c00dee
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: ![CleanShot 2024-02-05 at 22 52 10@2x](https://github.com/vercel/next.js/assets/51714798/8ae79f00-f987-4919-946c-d8363d540cef) > With forwarding: ![CleanShot 2024-02-05 at 22 51 31@2x](https://github.com/vercel/next.js/assets/51714798/32bd4072-9373-4cb0-ab05-f862a818e0d7) --------- Co-authored-by: JJ Kasper <jj@jjsweb.site>
18 lines
381 B
TypeScript
18 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,
|
|
})
|
|
})
|
|
}
|
|
)
|