Sometimes, we want to fix console.log statements output nothing in Jest.
In this article, we’ll look at how to fix console.log statements output nothing in Jest.
How to fix console.log statements output nothing in Jest?
To fix console.log statements output nothing in Jest, we can set the silent option to false.
For instance, we run
npm run test -- --silent=false
to set silent to false given that test is a script in package.json that runs jest.
Conclusion
To fix console.log statements output nothing in Jest, we can set the silent option to false.