test: consolidate duplicate mode branches in build error tests (#99135)
## Summary Follow-up to #98847 and #98848, addressing [this review comment](https://github.com/vercel/next.js/pull/98847#discussion_r_placeholder) about the duplicate `isNextDev` check in `cache-components-edge-deduplication`. Several suites that gained deploy coverage branch on the test mode twice in a row: once to decide whether `next.start()` should resolve or reject, and again to pick the assertions. Each pair is folded into a single branch so the start call sits with the assertions that depend on it. Two suites that wrote `if (isNextDev) { ... }` followed by `if (!isNextDev) { ... }` now use a plain `else`, and `interception-routes-output-export` drops an `else if (isNextDev)` that could only ever be an `else`. No assertion changes. - `cache-components-edge-deduplication` - `cache-components-route-handler-errors` - `app-edge-invalid-reexport` — the start branch also folded the `isTurbopack` distinction in, so the "Turbopack fails, webpack warns" split is stated once - `generate-static-params-error` — the dev-only `beforeAll` moved into the dev branch - `interception-routes-output-export` - `catches-missing-getStaticProps` - `conflicting-public-file-page` ## Verification - `pnpm test-start-turbo` — 7/7 suites pass - `pnpm test-dev-turbo` — 7/7 suites pass - `pnpm test-start-webpack` — 6 pass, 1 skipped (`cache-components-edge-deduplication` is `@force-gate turbopack`) - `pnpm test-dev-webpack` — 6/6 applicable suites pass 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>
Showing
Please
register
or
sign in
to comment