Skip to content

Commit 51a31d3

Browse files
committed
docs: remove snapshot testing in "React Example"
1 parent f977452 commit 51a31d3

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

docs/react-testing-library/example-intro.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -145,28 +145,3 @@ export default function Fetch({ url }) {
145145
)
146146
}
147147
```
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-
<div>
157-
<button
158-
disabled=""
159-
>
160-
Ok
161-
</button>
162-
<h1>
163-
hello there
164-
</h1>
165-
</div>
166-
</div>
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

Comments
 (0)