Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update @testing-library/dom Dependency for the v8 Release #188

Closed
jonioni opened this issue Aug 8, 2021 · 6 comments · Fixed by #224
Closed

Update @testing-library/dom Dependency for the v8 Release #188

jonioni opened this issue Aug 8, 2021 · 6 comments · Fixed by #224
Labels

Comments

@jonioni
Copy link

jonioni commented Aug 8, 2021

  • eslint-plugin-jest-dom version: v3.9.0
  • node version: N/A
  • npm version: N/A

Relevant code or config: package.json

"dependencies": {
    ...
    "@testing-library/dom": "^7.28.1",
    ...
},

What you did: Install latest @testing-library/[email protected], @testing-library/[email protected], and [email protected].

What happened: testing-library/dom-testing-library#963

TypeError: Cannot destructure property 'DOMElement' of '_prettyFormat.default.plugins' as it is undefined.
      ...
      at Object.<anonymous> (node_modules/@testing-library/dom/dist/pretty-dom.js:33:3)
      at Object.<anonymous> (node_modules/@testing-library/dom/dist/config.js:11:18)
      at Object.<anonymous> (node_modules/@testing-library/dom/dist/queries/label-text.js:8:15)
      at Object.<anonymous> (node_modules/@testing-library/dom/dist/queries/index.js:7:18)
      at Object.<anonymous> (node_modules/@testing-library/dom/dist/get-queries-for-element.js:8:46)
      at Object.<anonymous> (node_modules/@testing-library/dom/dist/index.js:61:29)

Problem description:

@testing-library/[email protected] isn't compatible with the latest @testing-library/[email protected] release.

Suggested solution:

"dependencies": {
    ...
    "@testing-library/dom": "^7.28.1 || ^8.0.0",
    ...
},

Related: #185

@benmonro
Copy link
Member

done

@G-Rath
Copy link
Collaborator

G-Rath commented Nov 20, 2021

@benmonro I can't see where this is done? The dependency is still marked as requiring ^7.31.2 which doesn't allow v8; this is causing significant problems since I'm using @testing-library/user-event which has @testing-library/dom as a peer dependency that allows both v7 & v8 - the result is that npm is currently pulling in v7 of @testing-library/dom causing my tests to fail on v27 of jest.

@benmonro
Copy link
Member

@G-Rath sorry I'm not really able to provide support any more. I can give you admin if you want to provide a fix

@G-Rath
Copy link
Collaborator

G-Rath commented Nov 21, 2021

@benmonro no problem - I'm happy to help with support :)

@benmonro
Copy link
Member

Done. You are admin, thanks for the help @G-Rath

@github-actions
Copy link

github-actions bot commented Jan 2, 2022

🎉 This issue has been resolved in version 4.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants