mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
56b95f41a2
### What? Stabilizes the pages-router `syntax > runtime error` acceptance test without weakening its redbox assertions. ### Why? The fixture emitted runtime errors every second and waited exactly one second before capturing the first redbox. On slower release runners, a second error could arrive while the asynchronous snapshot was being collected, changing the expected single error into an array and causing repeated retries. The broader canary assertion cluster has several independent signatures; this PR intentionally addresses only the timing race with a reproducible, test-local cause. ### How? The redbox matcher now performs the initial wait itself, while the fixture uses a longer interval to leave a stable capture window. The later wait remains long enough for another runtime error to occur, preserving the test’s core assertion that a subsequent runtime error does not replace the syntax/build error. ### Verification - `pnpm build-all` - `HEADLESS=true NEXT_TELEMETRY_DISABLED=1 NEXT_TEST_CI=true pnpm test-dev-webpack test/development/acceptance/error-recovery.test.ts` (6 tests and 10 snapshots passed) - Prettier and ESLint on the changed file <!-- NEXT_JS_LLM --> <!-- fleet ee9dd3ec-a271-4d0d-8165-d7872e226a6a --> Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>