File size: 600 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import { createNext } from 'e2e-utils'
describe('next start without next build', () => {
it('should show error when there is no production build', async () => {
const next = await createNext({
files: __dirname,
skipStart: true,
startCommand: `pnpm next start`,
serverReadyPattern: /✓ Starting.../,
})
await next.start()
await new Promise<void>((resolve, reject) => {
next.on('stderr', (msg) => {
if (msg.includes('Could not find a production build in the')) {
resolve()
}
})
})
await next.destroy()
})
})
|