test: snapshot the proxy-runtime build error output (#99136)
## Summary
Follow-up to #98848, addressing [this review
comment](https://github.com/vercel/next.js/pull/98848#discussion_r4074331118)
asking for a snapshot test.
The Turbopack production assertion in `proxy-runtime` compared a
hand-maintained `expected` literal against the CLI output with
`toContain`, with the deploy differences patched up by a local
`normalize` helper. It now extracts the build error section and asserts
it with an inline snapshot, so the whole diagnostic is pinned —
including the error count line and the trailing frame, which the
substring match never covered — and can be regenerated instead of edited
by hand.
The normalization deploy needed (timestamp prefixes, code-frame
indentation, dropped blank lines) runs in every mode now, so a single
snapshot covers local and deploy builds rather than branching on
`isNextDeploy`.
### Tests that were checked and left alone
`use-cache-close-over-function` and `use-cache-hanging` have the same
`expected` + `normalize` + `toContain` shape from #98847, but their
build errors happen during page generation, so the surrounding output
interleaves `Generating static pages using N workers (n/m)` lines — `N`
follows the host's CPU count and the progress lines vary run to run. In
`use-cache-close-over-function` the failing route also varies, which is
why the existing assertion matches `"/(client|server)"`. A snapshot over
that region would be flaky, so both keep their targeted substring
assertions. `proxy-runtime` is snapshot-safe because its error is a
compile error raised before page generation starts.
## Verification
- `pnpm test-start-turbo` — passes, and a second run passes against the
committed snapshot
- `pnpm test-start-webpack`, `pnpm test-dev-turbo`, `pnpm
test-dev-webpack` — pass (these take the unchanged non-Turbopack/dev
branch)
Local checks used the published native binding. Deploy validation is
pending repository CI.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>