redux-saga-test-plan
redux-saga-test-plan copied to clipboard
Failing tests cannot console.log
trafficstars
I have a test which is using expectSaga, the saga gets called, but if the test fails, it doesn't output any console.log which was within the saga.
If the test passes, console.log within the saga are output
Hi @slpixe. Can you provide a test case with this behavior? Also, which test runner and Node version are you using?
I experience similar issue. But in my case the console.log doesn't get shown even in the successful test.
v16.14.2 "jest": "~27.3.1",
EDIT:
In my case I didn't await nor return the expectSaga so the test completed before the console.log() get a chance to run.