mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
These tests won't ever be run in a deployed environment, so this removes `skipDeployment` so it's easier to grok which tests are intentionally disabled because they don't work when deployed.
29 lines
864 B
TypeScript
29 lines
864 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
|
|
describe('config validation - warnings only', () => {
|
|
const { next } = nextTestSetup({
|
|
skipStart: true,
|
|
files: __dirname,
|
|
})
|
|
|
|
it('should show warnings but not block the build', async () => {
|
|
const { exitCode, cliOutput } = await next.build()
|
|
|
|
// Build should succeed
|
|
expect(exitCode).toBe(0)
|
|
|
|
// Should show warnings
|
|
expect(cliOutput).toContain('Invalid next.config.js options detected')
|
|
expect(cliOutput).toContain(
|
|
"Unrecognized key(s) in object: 'unknownExperimentalOption', 'anotherUnknownOption'"
|
|
)
|
|
expect(cliOutput).toContain('at "experimental"')
|
|
|
|
// Should NOT show fatal error message
|
|
expect(cliOutput).not.toContain('Fatal next config errors')
|
|
|
|
// Build should complete successfully
|
|
expect(cliOutput).toContain('Compiled successfully')
|
|
})
|
|
})
|