mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
## What? Converts more tests that use `createNext` to `nextTestSetup` Follow-up to #93767 --------- Co-authored-by: Cursor <[email protected]>
22 lines
549 B
TypeScript
22 lines
549 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
|
|
describe('next start without next build', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
skipStart: true,
|
|
startCommand: `pnpm next start`,
|
|
serverReadyPattern: /Local:/,
|
|
})
|
|
|
|
it('should show error when there is no production build', async () => {
|
|
await next.start()
|
|
await new Promise<void>((resolve) => {
|
|
next.on('stderr', (msg) => {
|
|
if (msg.includes('Could not find a production build in the')) {
|
|
resolve()
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|