Does Jest swallow console.log
output?
// __tests__/log.test.js
it('logs', () => {
console.log('hey') // expect to see "hey" printed in terminal
})
// terminal output
$ jest --forceExit
PASS __tests__/log.test.js
✓ logs (1ms) # where's "hey"?
The main reason I care is that I'm writing some async beforeAll
and afterAll
stuff, and I want to use console.log statements to debug the order of events.