next.js
07e99477 - [test] Make `build-output-prerender` error ordering deterministic (#95308)

Commit
53 days ago
[test] Make `build-output-prerender` error ordering deterministic (#95308) The `build-output-prerender` test flaked because `getPrerenderOutput` sorted the per-route error blocks to absorb non-deterministic prerender ordering, but the sort misplaced the newline that separates two blocks: the inter-block separator is owned by the earlier block, and the final block has no trailing newline because it abuts the `Export encountered errors` summary. When the routes happened to prerender in reverse order and the sort moved the separator-bearing block to the front, the two error blocks collided onto one line and an extra blank line appeared before the summary. This reverts the sorting workaround that PR #94905 added to the test and instead removes the source of the non-determinism: the fixture now sets `experimental.staticGenerationMaxConcurrency: 1` so the build renders one page at a time and reports prerender errors in a stable order. The preamble snapshots are updated across webpack, Turbopack, and Rspack (with and without Cache Components) to include the configured flag, which the build prints in its experimental features list.
Author
Parents
Loading