mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
## What? Includes the changes from 16-2. --------- Co-authored-by: JJ Kasper <[email protected]> Co-authored-by: Josh Story <[email protected]> Co-authored-by: Zack Tanner <[email protected]> Co-authored-by: Benjamin Woodruff <[email protected]>
25 lines
629 B
TypeScript
25 lines
629 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
|
|
describe('app-dir - max postponed state size', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
env: {
|
|
NEXT_PRIVATE_TEST_HEADERS: '1',
|
|
},
|
|
})
|
|
|
|
it('should return 413 when next-resume request exceeds max postponed state size', async () => {
|
|
const res = await next.fetch('/', {
|
|
method: 'POST',
|
|
headers: {
|
|
'next-action': 'abc123',
|
|
'next-resume': '1',
|
|
},
|
|
body: Buffer.alloc(1025, 'x'),
|
|
})
|
|
|
|
expect(res.status).toBe(413)
|
|
expect(await res.text()).toContain('Postponed state exceeded 1 KB limit.')
|
|
})
|
|
})
|