()
| 6 | const appDir = path.join(__dirname, '..') |
| 7 | |
| 8 | const runTests = () => { |
| 9 | it('should not opt-out of auto static optimization from invalid _error', async () => { |
| 10 | const output = await nextBuild(appDir, undefined, { |
| 11 | stdout: true, |
| 12 | stderr: true, |
| 13 | }) |
| 14 | |
| 15 | if (output.code) { |
| 16 | console.log(output) |
| 17 | } |
| 18 | |
| 19 | const combinedOutput = output.stderr + output.stdout |
| 20 | |
| 21 | expect(output.code).toBe(0) |
| 22 | expect(combinedOutput).not.toContain( |
| 23 | 'You have opted-out of Automatic Static Optimization due to' |
| 24 | ) |
| 25 | expect(combinedOutput).toContain( |
| 26 | 'The following reserved Next.js pages were detected not directly under the pages directory' |
| 27 | ) |
| 28 | expect(combinedOutput).toContain('/app/_error') |
| 29 | }) |
| 30 | } |
| 31 | |
| 32 | describe('Auto Export _error bail', () => { |
| 33 | ;(process.env.TURBOPACK_DEV ? describe.skip : describe)( |
no test coverage detected