cypress-and-jest-typescript-example icon indicating copy to clipboard operation
cypress-and-jest-typescript-example copied to clipboard

Error while working with Jest and Cypress

Open Algoritm211 opened this issue 3 years ago • 0 comments

Our team decided to use Jest and Cypress together to display our application’s test coverage and collect all tests in one place.

However, when we run the tests, we get the error:

The following error originated from your test code, not from Cypress.
  > Do not import @jest/globals outside of the Jest test environment
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
Cypress could not associate this error to any specific test.
We dynamically generated a new test to display this failure.

Can you please tell us how to solve this problem, we are really stuck on this error I also attach a screenshot of the error:

https://i.stack.imgur.com/MuqLJ.png Thanks a lot in advance for your help.

Algoritm211 avatar Sep 30 '21 08:09 Algoritm211