MCPcopy
hub / github.com/vercel/next.js / runTests

Function runTests

test/integration/auto-export-error-bail/test/index.test.ts:8–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6const appDir = path.join(__dirname, '..')
7
8const 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
32describe('Auto Export _error bail', () => {
33 ;(process.env.TURBOPACK_DEV ? describe.skip : describe)(

Callers 1

index.test.tsFile · 0.70

Calls 4

nextBuildFunction · 0.90
itFunction · 0.50
expectFunction · 0.50
logMethod · 0.45

Tested by

no test coverage detected