[4.1.3] Cannot find module 'jest-dom/extend-expect'

See original GitHub issue
  • react-testing-library version: 4.1.4
  • react version: 16.4.1
  • node version: 9.11.1
  • npm (or yarn) version: yarn 1.3.2

Relevant code or config:

// occurring error this line
import 'jest-dom/extend-expect'

entire test code https://github.com/ryota-murakami/redux-boilerplate-less-architecture/blob/master/src/pages/github/index.test.js

What you did:

What happened:

Test Broke with Cannot find module 'jest-dom/extend-expect'

Reproduction:

I don’t know why is that happening because there is no jest-dom change [https://github.com/kentcdodds/react-testing-library/compare/v4.1.2...v4.1.3](between v4.1.2 v4.1.3).

something of dom-testing-liblary? thanks😀

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

33reactions
nec286commented, Sep 15, 2019
yarn add -D @testing-library/jest-dom
32reactions
stevenYouhanacommented, Feb 7, 2020

replace import “jest-dom/jest-dom/extend-expect”; with import “@testing-library/jest-dom/extend-expect”;

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - @testing-library/jest-dom not loading - Stack Overflow
I've yarn add 'ed it, and can't think of what step I missed. expect.extend fails because its toHaveStyle is undefined. Here's my test...
Read more >
@testing-library/jest-dom - npm
This solution. The @testing-library/jest-dom library provides a set of custom jest matchers that you can use to extend jest. These will make ...
Read more >
Discussion on: Setting up Jest + React-Testing-Library
It returns me Cannot find module './dist/extend-expect' from 'extend-expect.js' even when it is installed =/ "devDependencies": ...
Read more >
cannot find module 'path' or its corresponding type ... - You.com
To solve the "Cannot find module `path` or its corresponding type declarations" error, install the types for node by running the command `npm...
Read more >
testing-library/jest-dom v5.16.5 - npm.io
Use this matcher to avoid double negation in your tests. This custom matcher does not take into account the presence or absence of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found