We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f977452 commit 51a31d3Copy full SHA for 51a31d3
docs/react-testing-library/example-intro.md
@@ -145,28 +145,3 @@ export default function Fetch({ url }) {
145
)
146
}
147
```
148
-
149
-```jsx
150
-expect(screen.getByRole('heading')).toHaveTextContent('hello there')
151
-expect(screen.getByRole('button')).toHaveAttribute('disabled')
152
153
-// snapshots work great with regular DOM nodes!
154
-expect(container).toMatchInlineSnapshot(`
155
- <div>
156
157
- <button
158
- disabled=""
159
- >
160
- Ok
161
- </button>
162
- <h1>
163
- hello there
164
- </h1>
165
- </div>
166
167
-`)
168
169
-// you can also use get a `DocumentFragment`,
170
-// which is useful if you want to compare nodes across render
171
-expect(asFragment()).toMatchSnapshot()
172
-```
0 commit comments