fix: decouple browser() unsupported test from installed react-dom version - #253
Merged
Merged
Conversation
…sion The pathlessSSROutletDeferral unsupported-build test relied on the repo's installed react-dom (19.2) predating the browser() API, so bumping react-dom to 19.3 (where browser() exists) made the expected throw disappear. Mock react-dom without the browser export instead, mirroring how browserBailout.test.tsx mocks the supported case, so the test passes regardless of the installed React version. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HAkWNhyYW1CqT7oDrNjffk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CI on #252 fails because
browserBailout.unsupported.test.tsxrelied on the repo's installed react-dom (19.2) predating thebrowser()API. The Dependabot bump to react-dom 19.3.0 makesbrowsera real export, sogetBrowserFn()no longer throws and the "throws when opted in on a React build without the browser() API" assertion fails.This PR makes the test independent of the installed React version: it mocks
react-domwith thebrowserexport removed (vi.mockreturning{ ...actual, browser: undefined }), mirroring how the companionbrowserBailout.test.tsxmocks the supported case.Verification
typeof ReactDOM.browser === "function"— the exact condition on chore(deps): bump the production-dependencies group across 1 directory with 3 updates #252's CI): 350/350 tests pass.pnpm lint,pnpm format:check, andpnpm typecheckare clean.Once this lands, rebasing #252 on master (
·@·d·ependabot r·ebase) should turn its CI green.🤖 Generated with Claude Code
https://claude.ai/code/session_01HAkWNhyYW1CqT7oDrNjffk
Generated by Claude Code