When I run my tests, I get the following message for each suite:
FAIL __tests__/automatic/office/seo.test.js
● Test suite failed to run
TypeError: runtime.unstable_shouldLoadAsEsm is not a function
at jestAdapter (node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:125:23)
npm inpm install --save-dev jest-circus"testRunner": "jest-circus/runner" to the jest config.jestNot to get this error but for my tests to run
https://repl.it/repls/LopsidedLightgreyBlogware
System:
OS: macOS High Sierra 10.13.6
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Binaries:
Node: 10.16.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
npmPackages:
jest: ^24.8.0 => 24.9.0
You need to match the major of jest-circus with the major of jest. In this case you're installing v25 of circus and v24 of jest. Should probably be specified in the docs... Wanna send a PR updating the docs with this information? "The docs" being jest-circus's readme I guess
I had difference between minor version and still got this error. Making sure that jest and jest-circus are both 25.4.0 solved this error for me.
Hmm, might need to add a guard for that... Did npm/yarn print any peer dependency warnings?
I too had the same problem. I was facing this issue in version 25.4.0. Try to change the jest-circus version to 25.3.0. This works for me.
Did npm/yarn print any peer dependency warnings?
Did npm/yarn print any peer dependency warnings?
I observed the same thing and no peer dependency warnings
Most helpful comment
I had difference between minor version and still got this error. Making sure that jest and jest-circus are both 25.4.0 solved this error for me.