Files
4588a73542 Convert tests using createNext -> nextTestSetup (#93767)
## What?

Converts existing `createNext()` usage into `nextTestSetup()`. 

`createNext()` was the setup step we had before `nextTestSetup()` was
added.

This PR focused on the simple conversion cases. There will be a
follow-up to complete the last few.

---------

Co-authored-by: Cursor <[email protected]>
2026-05-12 13:16:31 +02:00

23 lines
862 B
TypeScript

import { FileRef, nextTestSetup } from 'e2e-utils'
import { join } from 'path'
describe('app-dir-hide-suppressed-error-during-next-export', () => {
const { next } = nextTestSetup({
skipStart: true,
files: {
'next.config.js': new FileRef(join(__dirname, 'next.config.js')),
app: new FileRef(join(__dirname, 'app')),
},
})
it('should not log suppressed error when exporting static page', async () => {
await expect(next.start()).rejects.toThrow('next build failed')
expect(next.cliOutput).toInclude('Page build time error')
expect(next.cliOutput).toInclude('occurred prerendering page "/"')
expect(next.cliOutput).toInclude('Export encountered errors on 1 path')
expect(next.cliOutput).not.toInclude(
'The specific message is omitted in production builds to avoid leaking sensitive details.'
)
})
})