UNPKG

@yoroi/common

Version:

The Common package of Yoroi SDK

17 lines 772 B
import React from 'react'; import { render } from '@testing-library/react-native'; import { SuspenseBoundary } from './SuspenseBoundary'; import { Text } from 'react-native'; const LazyComponent = /*#__PURE__*/React.lazy(() => Promise.resolve({ default: () => /*#__PURE__*/React.createElement(Text, null, "Lazy Component Loaded") })); describe('SuspenseBoundary Component', () => { it('renders fallback content while suspending', async () => { const { findByTestId } = render( /*#__PURE__*/React.createElement(SuspenseBoundary, null, /*#__PURE__*/React.createElement(LazyComponent, null))); const fallbackContent = await findByTestId('suspending'); expect(fallbackContent).toBeTruthy(); }); }); //# sourceMappingURL=SuspenseBoundary.test.js.map