/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict-local * @format * @oncall react_native */ 'use strict'; import nullthrows from 'nullthrows'; const VirtualizedSectionList = require('../VirtualizedSectionList'); const React = require('react'); const ReactTestRenderer = require('react-test-renderer'); describe('VirtualizedSectionList', () => { it('renders simple list', async () => { let component; await ReactTestRenderer.act(() => { component = ReactTestRenderer.create( } getItem={(data, key) => data[key]} getItemCount={data => data.length} />, ); }); expect(component).toMatchSnapshot(); }); it('renders empty list', async () => { let component; await ReactTestRenderer.act(() => { component = ReactTestRenderer.create( } getItem={(data, key) => data[key]} getItemCount={data => data.length} />, ); }); expect(component).toMatchSnapshot(); }); it('renders empty list with empty component', async () => { let component; await ReactTestRenderer.act(() => { component = ReactTestRenderer.create( } ListFooterComponent={() =>