import * as React from 'react'; import { render, screen } from '@testing-library/react'; import Callout from '../index'; describe('Callout', () => { it('should render the Callout component', async () => { const consoleErrorFn = jest .spyOn(console, 'error') .mockImplementation(() => jest.fn()); const child =
Callout Child
; render( {child} ); const blockNode = await screen.findByText('Callout Child'); expect(blockNode).toBeInTheDocument(); consoleErrorFn.mockRestore(); }); });