It seems that some combination of --silent=false or maybe --verbose=false is needed to get console.log output from Jest. But none of these options seems to help when my test throws an error:
test('console.log', () => {
console.log('this never prints')
throw new Error('something failed')
})
The error might be thrown by something in the test or by Jest itself for an assertion failure (i.e., when the test fails). Either way, Jest swallows any preceding console output.
How can I see console.log output regardless of whether something in the test throws an error?