fix(jest): restore RefreshControl mock to fix tests in RN 0.80 (Fixes: #52152)#52180
fix(jest): restore RefreshControl mock to fix tests in RN 0.80 (Fixes: #52152)#52180Aarshpatel12 wants to merge 1 commit into
Conversation
|
javache
left a comment
There was a problem hiding this comment.
There seem to be more changes here than just the RefreshControlMock. Please revert those.
|
#51669 moved the refresh control mock to https://github.com/facebook/react-native/blob/main/packages/react-native/jest/mocks/RefreshControl.js |
cipolleschi
left a comment
There was a problem hiding this comment.
we can't accept this fix. The snapshots have been updated in a windows machine and all of them now use \ as path separators insteado of /. This will break tests internally as in CI we run them using linux based machines.
|
This PR is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label. |
|
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This PR fixes a regression introduced in React Native 0.80.0 where Jest tests fail due to a missing RefreshControlMock file.
The mock was removed in #50784 when .npmignore files were replaced, causing a missing reference during Jest setup. This impacts not just core tests, but also third-party libraries such as react-native-gesture-handler and react-native-drawer-layout that depend on this mock during testing.
Changelog
[Internal] Fixed missing Jest mock for
RefreshControlcausing test failures in React Native 0.80.0.Test Plan
RefreshControlMock.jsinLibraries/Components/RefreshControl/__mocks__yarn testlocally on both macOS and Windows — all test suites and snapshots passedFixes: #52152