Summary
Upgrade @testing-library/react-native from 13.x to 14.x in apps/mobileAppYC. This is blocked on a React version bump, so it was held back out of the jest 30 chore PR (#1959) rather than landed with it.
Problem / motivation
Dependabot offered v14 inside the grouped testing bump. Taking it made 283 of 456 mobile suites fail.
Two independent blockers:
- React version. v14 replaces
react-test-renderer with the new test-renderer package, whose react-reconciler requires React 19.2. react-native 0.81 pins React 19.1, so render() returns an unusable object.
- Removed queries. v14 drops the
UNSAFE_* queries, which these suites currently use.
Holding at ^13.3.3 keeps the other three testing-group bumps (jest 30 and friends) shippable. The cost is that apps/mobileAppYC stays a major behind on its testing library, and dependabot will keep re-offering v14.
Proposed solution
- Move
react-native to a version that pins React >= 19.2 (or otherwise get React 19.2 into the mobile workspace without breaking RN).
- Add
test-renderer and drop react-test-renderer plus @types/react-test-renderer.
- Migrate every
UNSAFE_* query to a supported query.
- Bump
@testing-library/react-native to 14.x and get all mobile suites green.
Scope
apps/mobileAppYC/package.json (@testing-library/react-native, react-test-renderer -> test-renderer, React/RN versions)
- Mobile test files using
UNSAFE_* queries
- Any test importing
react-test-renderer directly - there are currently 17 such files
Out of scope
Current state / where it plugs in
apps/mobileAppYC is on @testing-library/react-native ^13.3.3, react-test-renderer 19.1.0, react-native 0.81.4, React 19.1.0.
Note this overlaps the mobile test-teardown work: 17 files drive react-test-renderer directly, which is the same surface as #1822 and PR #1821. Sequencing matters - doing this before or after that work, not concurrently.
Acceptance criteria
Test plan
Full apps/mobileAppYC Jest suite with TZ=UTC, plus type-check and lint. Run the full suite several times consecutively - this workspace has a known cross-suite flake profile, so a single green run is not sufficient evidence.
Alternatives considered
- Take v14 now and pin React 19.2 directly. Rejected: it would put the React version out of step with what react-native 0.81 expects.
- Ignore the major in dependabot config. Hides the work rather than tracking it, and the PR would stop being re-offered.
Dependencies & risks
Additional context
Held back in #1959. Failure signature on the attempted upgrade: render returning an unusable object across 283 of 456 suites.
Summary
Upgrade
@testing-library/react-nativefrom 13.x to 14.x inapps/mobileAppYC. This is blocked on a React version bump, so it was held back out of the jest 30 chore PR (#1959) rather than landed with it.Problem / motivation
Dependabot offered v14 inside the grouped testing bump. Taking it made 283 of 456 mobile suites fail.
Two independent blockers:
react-test-rendererwith the newtest-rendererpackage, whosereact-reconcilerrequires React 19.2.react-native0.81 pins React 19.1, sorender()returns an unusable object.UNSAFE_*queries, which these suites currently use.Holding at
^13.3.3keeps the other three testing-group bumps (jest 30 and friends) shippable. The cost is thatapps/mobileAppYCstays a major behind on its testing library, and dependabot will keep re-offering v14.Proposed solution
react-nativeto a version that pins React >= 19.2 (or otherwise get React 19.2 into the mobile workspace without breaking RN).test-rendererand dropreact-test-rendererplus@types/react-test-renderer.UNSAFE_*query to a supported query.@testing-library/react-nativeto 14.x and get all mobile suites green.Scope
apps/mobileAppYC/package.json(@testing-library/react-native,react-test-renderer->test-renderer, React/RN versions)UNSAFE_*queriesreact-test-rendererdirectly - there are currently 17 such filesOut of scope
Current state / where it plugs in
apps/mobileAppYCis on@testing-library/react-native^13.3.3,react-test-renderer19.1.0,react-native0.81.4, React 19.1.0.Note this overlaps the mobile test-teardown work: 17 files drive
react-test-rendererdirectly, which is the same surface as #1822 and PR #1821. Sequencing matters - doing this before or after that work, not concurrently.Acceptance criteria
@testing-library/react-nativeon 14.xtest-rendererreplacesreact-test-renderer, and@types/react-test-rendereris goneUNSAFE_*queries remain in mobile testsTest plan
Full
apps/mobileAppYCJest suite withTZ=UTC, plus type-check and lint. Run the full suite several times consecutively - this workspace has a known cross-suite flake profile, so a single green run is not sufficient evidence.Alternatives considered
Dependencies & risks
UNSAFE_*queries can change what the tests actually assert - each migration needs review, not a blanket find-and-replace.Additional context
Held back in #1959. Failure signature on the attempted upgrade:
renderreturning an unusable object across 283 of 456 suites.