import {render} from '@testing-library/react' import '@testing-library/jest-dom' test('renders a message', () => { const {asFragment, getByText} = render(<Greeting />) expect(getByText('Hello, world!')).toBeInTheDocument() expect(asFragment()).toMatchInlineSnapshot(` <h1>Hello, World!</h1> `) }) render OptionsYou won't often need to specify options, but if you ever do, here are the available opti
![API | Testing Library](https://cdn-ak-scissors.b.st-hatena.com/image/square/799487628ab759bb5cc524f9f3ea65ab0252d1a5/height=288;version=1;width=512/https%3A%2F%2Ftesting-library.com%2Fimg%2Foctopus-128x128.png)