import * as React from 'react'; import render from '../../_utils/tests/render'; import { Box } from '../../primitives'; import Container from '../../Container'; import Modal from '../Modal'; jest.mock('reakit/Portal', () => 'portal'); it('renders correctly for a default modal', () => { const { container } = render( {modal => ( {({ fallbackFocusRef }) => This is the content} )} , { theme: { Toast: { disabled: true } } } ); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly with a renderWrapper prop', () => { const { container } = render( {modal => ( {children}}> {({ fallbackFocusRef }) => This is the content} )} , { theme: { Toast: { disabled: true } } } ); expect(container.firstChild).toMatchSnapshot(); });