Accepted answer

I really do not know what exactly happened, some packages related to jest, jet-dom, jest-enzyme was mkaing a conflict. but I managed to make it work after deleting package-lock.json, yarn.lock, node_modules, removing jest from the dependencies in package.json, then doing npm install and yarn install!


You should not need to import jest into your test files.

You should instead tell eslint what Environment it should expect in the file so it knows what globals are present.

Add this to the top of any files where you use jest globals

/* eslint-env jest */

Related Query

More Query from same tag