Update interruptible rendering test to use feature flag to fix React<>Fabric priorities (#50959)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50959

Changelog: [internal]

This updates the test for interruptible rendering to use the feature flag that fixes priority mapping between Fabric and React.

In this case, it shows how the change fixed how React Native implements the React programming model, as before this change continuous events weren't interrupting transitions (and they should): https://github.com/facebook/react/blob/c498bfce8b9baa3dd21bd0d5124eb3a4549886f1/packages/react-reconciler/src/__tests__/ReactUpdatePriority-test.js#L109

Reviewed By: sammy-SC

Differential Revision: D73662527

fbshipit-source-id: 6276fe6f02b6c4e1af8dbb7d46c9a14ee6846636
This commit is contained in:
Rubén Norte
2025-04-28 06:55:25 -07:00
committed by Facebook GitHub Bot
parent 9ae7f7fcc1
commit e162fba413
@@ -7,6 +7,7 @@
* @flow strict-local
* @format
* @oncall react_native
* @fantom_flags fixMappingOfEventPrioritiesBetweenFabricAndReact:true
*/
import 'react-native/Libraries/Core/InitializeCore';
@@ -213,8 +214,8 @@ describe('continuous event category', () => {
deferredText: 'first render',
});
expect(effectMock.mock.calls[1][0]).toEqual({
text: 'initial text',
deferredText: 'transition',
text: 'start: 1, end: 5',
deferredText: 'first render',
});
expect(effectMock.mock.calls[2][0]).toEqual({
text: 'start: 1, end: 5',