[PR #556] [MERGED] test: add production coverage for global-error compat #671

Closed
opened 2026-05-06 13:09:28 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/556
Author: @NathanDrake2406
Created: 3/16/2026
Status: Merged
Merged: 3/16/2026
Merged by: @james-elicx

Base: mainHead: fix/app-router-error-boundary-200


📝 Commits (3)

  • b84d25f Add production coverage for global-error compat
  • efefba9 Address global-error review feedback
  • a49bd19 docs: update tracker notes for tests #3 and #4 to reflect production preview coverage

📊 Changes

2 files changed (+106 additions, -22 deletions)

View changed files

📝 tests/nextjs-compat/TRACKING.md (+21 -21)
📝 tests/nextjs-compat/global-error.test.ts (+85 -1)

📄 Description

Summary

This updates the App Router global-error compat coverage to reflect current vinext behavior and adds production-preview assertions for the HTTP-level cases that were previously tracked as skipped.

What Changed

  • added production-preview coverage in tests/nextjs-compat/global-error.test.ts for:
    • local error.tsx on server component errors
    • nearest nested error.tsx
    • local error.tsx for generateMetadata() errors
    • global-error.tsx fallback when metadata has no local boundary
  • updated tests/nextjs-compat/TRACKING.md to mark those cases as passing instead of skipped
  • left runtime code unchanged because the bug no longer reproduces on current upstream/main

Why It Matters

The tracker was claiming a meaningful Next.js compatibility bug around handled errors returning 500 instead of 200. The current implementation already matches Next.js for the server-side HTTP semantics here, so the right fix is to lock that behavior in with direct coverage and stop advertising a stale regression.

Risks Or Limits

  • this does not add the browser-only global-error interactions from the upstream Next.js suite
  • the production-preview block adds build time to this one compat file, but it directly covers the disputed behavior that was missing from the compat suite

Verification

  • vp test tests/nextjs-compat/global-error.test.ts

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/556 **Author:** [@NathanDrake2406](https://github.com/NathanDrake2406) **Created:** 3/16/2026 **Status:** ✅ Merged **Merged:** 3/16/2026 **Merged by:** [@james-elicx](https://github.com/james-elicx) **Base:** `main` ← **Head:** `fix/app-router-error-boundary-200` --- ### 📝 Commits (3) - [`b84d25f`](https://github.com/cloudflare/vinext/commit/b84d25f4391f82cd8ebdcb97b1a89cdd6b2c14f5) Add production coverage for global-error compat - [`efefba9`](https://github.com/cloudflare/vinext/commit/efefba90218fa6c1e05d7daaaa7c4c3d0bba0a79) Address global-error review feedback - [`a49bd19`](https://github.com/cloudflare/vinext/commit/a49bd19e30043442c500a14440389b4a302a6d09) docs: update tracker notes for tests #3 and #4 to reflect production preview coverage ### 📊 Changes **2 files changed** (+106 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `tests/nextjs-compat/TRACKING.md` (+21 -21) 📝 `tests/nextjs-compat/global-error.test.ts` (+85 -1) </details> ### 📄 Description ## Summary This updates the App Router `global-error` compat coverage to reflect current vinext behavior and adds production-preview assertions for the HTTP-level cases that were previously tracked as skipped. ## What Changed - added production-preview coverage in `tests/nextjs-compat/global-error.test.ts` for: - local `error.tsx` on server component errors - nearest nested `error.tsx` - local `error.tsx` for `generateMetadata()` errors - `global-error.tsx` fallback when metadata has no local boundary - updated `tests/nextjs-compat/TRACKING.md` to mark those cases as passing instead of skipped - left runtime code unchanged because the bug no longer reproduces on current `upstream/main` ## Why It Matters The tracker was claiming a meaningful Next.js compatibility bug around handled errors returning `500` instead of `200`. The current implementation already matches Next.js for the server-side HTTP semantics here, so the right fix is to lock that behavior in with direct coverage and stop advertising a stale regression. ## Risks Or Limits - this does not add the browser-only `global-error` interactions from the upstream Next.js suite - the production-preview block adds build time to this one compat file, but it directly covers the disputed behavior that was missing from the compat suite ## Verification - `vp test tests/nextjs-compat/global-error.test.ts` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:09:28 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#671
No description provided.