mirror of
https://github.com/cloudflare/vinext.git
synced 2026-09-14 19:04:59 +08:00
b49974eb4f
* fix: add tests verifying strings thrown in Server Components are not swallowed (#810) Next.js had a bug where createReactServerErrorHandler returned early for typeof thrownValue === 'string', swallowing the error before logging. vinext's rscOnError already handles strings correctly (they flow through the normal error path and get wrapped into Error objects). Added: - Fixture page that throws a string in a Server Component - Integration test verifying the error boundary renders with the string message - Runtime test confirming rscOnError returns a valid digest for string throws - Static test confirming generated code has no early string-return path Upstream: vercel/next.js@b9ca95c62d * fix: address review feedback on string error handling tests (#950) - Move prodRscOnError creation into beforeAll to avoid duplicating new Function construction - Remove brittle positive assertions (instanceof Error, String(error)) from static test; keep only the negative anti-pattern guard - Use textContentByTestId helper for integration test precision over loose html.toContain