Skip to content

Commit e162fba

Browse files
rubennortefacebook-github-bot
authored andcommitted
Update interruptible rendering test to use feature flag to fix React<>Fabric priorities (#50959)
Summary: Pull Request resolved: #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
1 parent 9ae7f7f commit e162fba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/react-native/Libraries/ReactNative/__tests__/InterruptibleRendering-itest.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* @flow strict-local
88
* @format
99
* @oncall react_native
10+
* @fantom_flags fixMappingOfEventPrioritiesBetweenFabricAndReact:true
1011
*/
1112

1213
import 'react-native/Libraries/Core/InitializeCore';
@@ -213,8 +214,8 @@ describe('continuous event category', () => {
213214
deferredText: 'first render',
214215
});
215216
expect(effectMock.mock.calls[1][0]).toEqual({
216-
text: 'initial text',
217-
deferredText: 'transition',
217+
text: 'start: 1, end: 5',
218+
deferredText: 'first render',
218219
});
219220
expect(effectMock.mock.calls[2][0]).toEqual({
220221
text: 'start: 1, end: 5',

0 commit comments

Comments
 (0)