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.

Jest 23 and react-scripts are conflicting

See original GitHub issue

Jest 23 when run with react-scripts in my project is throwing:

TypeError: environment.teardown is not a function
  at node_modules/jest-runner/build/run_test.js:188:25

When I remove with yarn remove jest I assume my tests are using the react-scripts version of Jest (locked at 22.4.3) and the tests run normally.

Locking my version with yarn add jest@22.4.3 --dev doesn’t solve this issue.

This issue is obviously related to something within react-scripts and perhaps should be opened on that project but I can’t figure out what is going on and at least by creating the issue, I might save someone else from the research time that I’ve spent trying to track it down.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8

github_iconTop GitHub Comments

6reactions
funkfingercommented, May 25, 2018

Sorry, I was incorrect. react-scripts is locked at 20.0.4 - when I lock my project to Jest 20.0.4, (yarn add jest@20.0.4 --dev) tests run as expected.

(I was accidentally looking at @next branch)

3reactions
joeynimucommented, Aug 29, 2018

I have got my tests running okay locally but when I run them on bitbucket pipeline I get this error;

    TypeError: environment.teardown is not a function
      at node_modules/jest-runner/build/run_test.js:230:25
Read more comments on GitHub >

github_iconTop Results From Across the Web

react-scripts babel-jest version conflict · Issue #7169 - GitHub
I would expect there to be no version conflicts in official packages which are part of the same official project and that running...
Read more >
Issue with babel-jest dependency when running npm start in a ...
I recieved error like: The react-scripts package provided by Create React App requires a dependency: "jest": "26.6.0" Don't try ...
Read more >
Kotlin version conflict when using Kotlin Gradle plugins in pre ...
So I do dependencies { implementation("org.jetbrains.kotlin.js:org.jetbrains.kotlin.js:1.4.0") } and in the pre-compiled script plugin I do plugins ...
Read more >
ts-jest - npm
ts-jest. A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript. NPM version NPM downloads ......
Read more >
Road to war: U.S. struggled to convince allies, and Zelensky ...
A Washington Post examination of the road to war in Ukraine, and Western efforts to unite to thwart the Kremlin's plans, draws on...
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