Created by: gnapse
jest-dom
's latest major version has its type definitions moved to DefinitelyTyped (see testing-library/jest-dom#123). This make it so the TypeScript definitions work automatically without config. This PR upgrades the version referenced in the template so that newly generated projects get the newest version right from the start.
The newest jest-dom
version also makes it so that the main module takes care of extending expect
, so this PR includes the following change where appropriate (though the usual way still works):
-import '@testing-library/jest-dom/extend-expect';
+import '@testing-library/jest-dom';
This PR also takes the liberty to upgrade the actual dev dependency of create-react-app
itself. Ran the tests and it all worked. Hope that's ok too.