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.

The tests stop running after installing jest-mongodb

See original GitHub issue

Tried to install jest-mongodb on a working project with tests that were already passing, but after installing it all the tests stops working, it just displays “Determining test suites to run…” and after a few seconds it shows something like “Done in 2.77s.”. Tried to carefully follow all the instructions on README but still was not able to make it work. When I comment th preset: '@shelf/jest-mongodb' line on my jest.config.js it works again.

I have a simple Express API (4.17.1) with Mongoose (5.7.12) running on Debian 10 Buster, Node v12.13.1.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:9

github_iconTop GitHub Comments

3reactions
sapariciocommented, Dec 7, 2019

I had the same problem. In my case, this is what caused the problem:

./node_modules/.cache/mongodb-memory-server/mongodb-binaries/4.0.3/mongod 
./node_modules/.cache/mongodb-memory-server/mongodb-binaries/4.0.3/mongod: /lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by ./node_modules/.cache/mongodb-memory-server/mongodb-binaries/4.0.3/mongod)

Fixed it using the mongod binary installed in my system instead. Hope it helps!

Awesome: installing libcurl3 fixed the problem. Thank you!

3reactions
flrndcommented, Dec 5, 2019

I had the same problem. In my case, this is what caused the problem:

./node_modules/.cache/mongodb-memory-server/mongodb-binaries/4.0.3/mongod 
./node_modules/.cache/mongodb-memory-server/mongodb-binaries/4.0.3/mongod: /lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by ./node_modules/.cache/mongodb-memory-server/mongodb-binaries/4.0.3/mongod)

Fixed it using the mongod binary installed in my system instead. Hope it helps!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jest did not exit one second after the test run has completed ...
Jest did not exit one second after the test run has completed. This usually means that there are asynchronous operations that weren't stopped...
Read more >
Jest — Fail Early (And Stop Testing If One Test Fails)
Stopping the test run after the first failed test saves you time, especially during development. Jest comes with a built-in feature to fail ......
Read more >
Using with MongoDB - Jest
Jest MongoDB provides all required configuration to run your tests using MongoDB. First install @shelf/jest-mongodb. npm; Yarn. npm ...
Read more >
Need help, code seems right but still getting error when i test ...
This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with --detectOpenHandles to ...
Read more >
Integration with Test Runners | mongodb-memory-server
It is very important to limit the spawned number of Jest workers on machines that have many cores, because otherwise the tests may...
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