Clean install of Jest Circus results in 'runtime.unstable_shouldLoadAsEsm' error
See original GitHub issue🐛 Bug Report
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)
To Reproduce
- Delete any existing node_modules and package.lock and jest.config.js
npm inpm install --save-dev jest-circus- add
"testRunner": "jest-circus/runner"to the jest config. - run
jest
Expected behavior
Not to get this error but for my tests to run
Link to repl or repo (highly encouraged)
https://repl.it/repls/LopsidedLightgreyBlogware
envinfo
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
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
jest-circus - npm
Start using jest-circus in your project by running `npm i jest-circus`. There are 742 other projects in the npm registry using jest-circus.
Read more >Explain the implementation principle of the Jest framework in ...
This article mainly provides you with an in-depth understanding of the operating principles behind Jest, which is convenient for responding ...
Read more >any Jest test fails with "result.message is not a function" after ...
After upgrading Jest to v.27.2.5 from v.26 if a test fails it shows me: result.message is not a function.
Read more >jest-circus-allure-environment - npm package - Snyk
Learn more about jest-circus-allure-environment: package health score, popularity, security, maintenance, versions and more.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.