Skip to content

Commit c8a8694

Browse files
README: update @testing-library/jest-dom's old syntax (#590)
[@testing-library/jest-dom v5.0.0](https://github.com/testing-library/jest-dom/releases/tag/v5.0.0) later, import statement had BreakingChange. So update to latest that in the README example. Thank you 😀 Co-authored-by: Sebastian Silbermann <[email protected]>
1 parent c4cae93 commit c8a8694

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export default HiddenMessage
171171
// __tests__/hidden-message.js
172172
// these imports are something you'd normally configure Jest to import for you
173173
// automatically. Learn more in the setup docs: https://testing-library.com/docs/react-testing-library/setup#cleanup
174-
import '@testing-library/jest-dom/extend-expect'
174+
import '@testing-library/jest-dom'
175175
// NOTE: jest-dom adds handy assertions to Jest and is recommended, but not required
176176

177177
import React from 'react'
@@ -261,7 +261,7 @@ export default Login
261261
// __tests__/login.js
262262
// again, these first two imports are something you'd normally handle in
263263
// your testing framework configuration rather than importing them in every file.
264-
import '@testing-library/jest-dom/extend-expect'
264+
import '@testing-library/jest-dom'
265265
import React from 'react'
266266
import {render, fireEvent, screen} from '@testing-library/react'
267267
import Login from '../login'

0 commit comments

Comments
 (0)