I have a FeathersJS api project running Jest for testing.
My tests suite is working fine. However, it always ends with the following warning message:
Jest has detected the following 2 open handles potentially keeping Jest from exiting:
● RANDOMBYTESREQUEST
at random (node_modules/bcryptjs/dist/bcrypt.js:70:56)
at node_modules/bcryptjs/dist/bcrypt.js:84:9
at node_modules/bcryptjs/dist/bcrypt.js:39:29
at Object.<anonymous> (node_modules/bcryptjs/dist/bcrypt.js:43:2)
● RANDOMBYTESREQUEST
at Object.<anonymous>.module.exports (node_modules/nexmo/node_modules/uuid/rng.js:3:10)
at Object.<anonymous> (node_modules/nexmo/node_modules/uuid/uuid.js:57:18)
at Object.<anonymous> (node_modules/nexmo/src/JwtGenerator.js:1:1)
What this error means and how can I fix it?
Note: I would be happy to add more details such as code sample, but I don't really know where to start. Don't hesitate to ask for more with comments, I will update the post accordingly.
Thanks
RANDOMBYTESREQUEST issue is in JEST
Initial investigation is in : https://github.com/facebook/jest/issues/11275
Which was then resolved in PR: https://github.com/facebook/jest/pull/11278
This fix is available in JEST version - 27.0.0.
So the solution is to upgrade Jest version to 27.0.0(minimum)