diff --git a/packages/react-native/Libraries/Components/ScrollView/__tests__/ScrollView-viewCulling-itest.js b/packages/react-native/Libraries/Components/ScrollView/__tests__/ScrollView-viewCulling-itest.js index c903094e35f..36299230016 100644 --- a/packages/react-native/Libraries/Components/ScrollView/__tests__/ScrollView-viewCulling-itest.js +++ b/packages/react-native/Libraries/Components/ScrollView/__tests__/ScrollView-viewCulling-itest.js @@ -2607,3 +2607,35 @@ describe('horizontal ScrollView in RTL script', () => { ]); }); }); + +describe('Views with no layout', () => { + it('are not culled', () => { + const root = Fantom.createRoot({viewportWidth: 100, viewportHeight: 100}); + + Fantom.runTask(() => { + root.render( + + + + + + , + ); + }); + + expect(root.takeMountingManagerLogs()).toEqual([ + 'Update {type: "RootView", nativeID: (root)}', + 'Create {type: "ScrollView", nativeID: (N/A)}', + 'Create {type: "View", nativeID: (N/A)}', + 'Create {type: "View", nativeID: "viewWithLayout"}', + 'Create {type: "View", nativeID: "viewWithoutLayout"}', + 'Insert {type: "View", parentNativeID: (N/A), index: 0, nativeID: "viewWithLayout"}', + 'Insert {type: "View", parentNativeID: (N/A), index: 1, nativeID: "viewWithoutLayout"}', + 'Insert {type: "View", parentNativeID: (N/A), index: 0, nativeID: (N/A)}', + 'Insert {type: "ScrollView", parentNativeID: (root), index: 0, nativeID: (N/A)}', + ]); + }); +});