Download next.js/test/development/start-no-build/start-no-build.test.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 600 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/start-no-build/start-no-build.test.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/development/start-no-build/start-no-build.test.ts
-
curl -L -o start-no-build.test.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/start-no-build/start-no-build.test.ts
600 Bytes
| 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() | |
| }) | |
| }) | |