From f6ca145039a23eef5b224ff7c6da5cc6b6719348 Mon Sep 17 00:00:00 2001 From: Ryota Murakami Date: Tue, 18 Feb 2020 22:42:30 +0900 Subject: [PATCH] README: update @testing-library/jest-dom's old syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [@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 😀 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fbe77b90..452c1d94 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ export default HiddenMessage // __tests__/hidden-message.js // these imports are something you'd normally configure Jest to import for you // automatically. Learn more in the setup docs: https://testing-library.com/docs/react-testing-library/setup#cleanup -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' // NOTE: jest-dom adds handy assertions to Jest and is recommended, but not required import React from 'react' @@ -261,7 +261,7 @@ export default Login // __tests__/login.js // again, these first two imports are something you'd normally handle in // your testing framework configuration rather than importing them in every file. -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' import React from 'react' import {render, fireEvent, screen} from '@testing-library/react' import Login from '../login'