Skip to content

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

Closed
@jchip

Description

@jchip
  • @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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions