mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Relands #68764 -- no additional changes were made, the errors were expected due to faulty user code.
30 lines
657 B
TypeScript
30 lines
657 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
|
|
describe('app-dir - client-page-error-bailout', () => {
|
|
const { next, skipped } = nextTestSetup({
|
|
files: __dirname,
|
|
skipStart: true,
|
|
})
|
|
|
|
if (skipped) {
|
|
return
|
|
}
|
|
|
|
let stderr = ''
|
|
beforeAll(() => {
|
|
const onLog = (log: string) => {
|
|
stderr += log
|
|
}
|
|
|
|
next.on('stderr', onLog)
|
|
})
|
|
|
|
it('should bail out in static generation build', async () => {
|
|
await next.build()
|
|
expect(stderr).toContain(
|
|
'Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error'
|
|
)
|
|
expect(stderr).toContain('Error: client-page-error')
|
|
})
|
|
})
|