repo_description: Test React Components with Jest and React Testing Library on TestingJavaScript.com
repo_topics: kcd-edu react react-testing-library testing testingjavascript
code: import * as React from 'react'
  import {render, within} from '@testing-library/react'
  import {Modal} from '../modal'
  
  test('modal shows the children', () => {
    render(
      <Modal>
        <div data-testid="test" />
      </Modal>,
    )
    const {getByTestId} = within(document.getElementById('modal-root'))
    expect(getByTestId('test')).toBeInTheDocument()
  })
  