mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
1. Fixed the incremental update bug in buildChunkGraph. 2. Fixed a bug in Rspack's built-in CssChunkingPlugin. For detailed release information, please see https://github.com/web-infra-dev/rspack/releases. Note: All the faulty Rspack test cases on GitHub, from what I can see, either time out or also produce errors in Rspack version 1.5.0. --------- Co-authored-by: Benjamin Woodruff <[email protected]>
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
|
|
describe('metadata-invalid-image-file', () => {
|
|
const { next, isTurbopack, isNextDev, skipped, isRspack } = nextTestSetup({
|
|
files: __dirname,
|
|
skipDeployment: true,
|
|
skipStart: true,
|
|
})
|
|
|
|
if (skipped) return
|
|
|
|
it('should error on invalid metadata image file', async () => {
|
|
// In dev, it needs to render the page first
|
|
if (isNextDev) {
|
|
await next.start()
|
|
await next.fetch('/')
|
|
} else {
|
|
await next.build()
|
|
}
|
|
|
|
if (isTurbopack) {
|
|
// In turbopack the image decoding error is displayed in multiple lines
|
|
expect(next.cliOutput).toContain('app/favicon.ico')
|
|
expect(next.cliOutput).toContain('Processing image failed')
|
|
expect(next.cliOutput).toContain('unable to decode image data')
|
|
} else {
|
|
expect(next.cliOutput).toContain(
|
|
'Error: Process image "/favicon.ico" failed:'
|
|
)
|
|
}
|
|
|
|
if (!isNextDev) {
|
|
// `next build` should fail
|
|
if (isTurbopack) {
|
|
expect(next.cliOutput).toContain('Build error occurred')
|
|
} else if (isRspack) {
|
|
expect(next.cliOutput).toContain(
|
|
'Build failed because of Rspack errors'
|
|
)
|
|
} else {
|
|
expect(next.cliOutput).toContain(
|
|
'Build failed because of webpack errors'
|
|
)
|
|
}
|
|
}
|
|
})
|
|
})
|