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

Recently published 7.29.5 has ReferenceError: jest is not defined when mocha is used #898

Closed
jchip opened this issue Feb 19, 2021 · 2 comments · Fixed by #900
Closed

Recently published 7.29.5 has ReferenceError: jest is not defined when mocha is used #898

jchip opened this issue Feb 19, 2021 · 2 comments · Fixed by #900
Labels
bug Something isn't working released

Comments

@jchip
Copy link

jchip commented Feb 19, 2021

  • @testing-library/dom version: 7.29.5
  • Testing Framework and version: mocha 8.3.0
  • DOM Environment: jsdom

Relevant code or config:

mocha unit test that was working before 7.29.5

What you did:

updated @testing-library/dom to 7.29.5

What happened:

unit test failed with jest is not defined error

Reproduction:

Problem description:

ReferenceError: jest is not defined
    at _runWithRealTimers (node_modules/.f/_/@testing-library/dom/7.29.5/@testing-library/dom/dist/helpers.js:42:5)

Suggested solution:

There's another use of jest a few lines above and it checks for it being undefined first, maybe need to do the same thing at the problem line.

@eps1lon
Copy link
Member

eps1lon commented Feb 19, 2021

Right, I forget that we actually define jest when using mocha.

@github-actions
Copy link

🎉 This issue has been resolved in version 7.29.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickserv nickserv added the bug Something isn't working label Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants