question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

  1. Delete any existing node_modules and package.lock and jest.config.js
  2. npm i
  3. npm install --save-dev jest-circus
  4. add "testRunner": "jest-circus/runner" to the jest config.
  5. 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:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
codejunkienickcommented, Apr 22, 2020

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.

0reactions
github-actions[bot]commented, May 11, 2021

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.

Read more comments on GitHub >

github_iconTop 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 | Yarn - Package Manager
Fast, reliable, and secure dependency management.
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found