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 without --runInBand slow under Travis

See original GitHub issue

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Tests run fine locally or with -i under travis. However running without -i in travis, tests take much longer (timing out).

If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.

What is the expected behavior?

Tests shouldn’t take > 20 minutes to run under travis when they take < 10 seconds locally.

Please provide your exact Jest configuration

No configuration. See repository for any details. https://github.com/fengari-lua/fengari/compare/v0.1.1...ebf18e2

Run npx envinfo --preset jest in your project directory and paste the results here

I don’t think this is the output you wanted…

$ npx envinfo --preset jest
npx: installed 1 in 1.326s
(node:11650) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '1' of null
    at e.darwin.process.platform.linux.process.platform.c.run.then.e (/home/daurnimator/.npm/_npx/11650/lib/node_modules/envinfo/dist/cli.js:2:94055)
    at <anonymous>
(node:11650) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11650) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:37 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
philvarnercommented, Aug 9, 2019

It would nice if this were in the jest documentation as a behavior of CircleCI. I was getting the Error: spawn ENOMEM failures in CircleCI, but not locally, and the fix of running jest --maxWorkers=2 worked perfectly, but it look almost an hour for me to figure that out, and the suggestion to add that flag that is buried deep in another (closed) bug about the memory problems.

2reactions
daurnimatorcommented, May 25, 2018

I think this can be closed now.

How so? It wasn’t fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - Jest
The --runInBand cli option makes sure Jest runs the test in the same process rather than spawning processes for individual tests.
Read more >
How to make your sluggish Jest tests go faster - ITNEXT
A step-by-step guide how to improve performance of your slow Jest unit test and make them blazingly fast and delightful again.
Read more >
Travis CI Fail Jest testing for Timeout reason - Stack Overflow
... only in Travis CI, I assumed that their servers were just slower than my local one. With that information, running : jest...
Read more >
Troubleshooting · Jest
Until the upstream issue is resolved, debugging with Node is not ... Note: the --runInBand cli option makes sure Jest runs test in...
Read more >
How to run Jest tests in parallel on Travis CI to ... - Knapsack Pro
Split JavaScript tests and run Jest on Travis CI with CI parallelisation to ... you have to wait 20 minutes for slow tests...
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