Closed notthatnathan closed 2 years ago
Sorry for answering so late (I wasn't watching this repo 🙈). I'm not sure to understand what the issue is. Could you share an example?
In my example above, the React error "Can't perform a React state update on an unmounted component" does not trigger a test failure, even though the log confirms it's hitting silenceMessage
and returning false
.
This is weird. Do you have the same behaviour if you remove your custom silenceMessage
function?
I'm sorry, I'd moved on to a custom solution, so I don't have that in front of me. My recollection is the tests still passed with those React "warnings" that are actually console.error
logs. Don't hold me to it.
Ok, I'm closing this then. Please comment if you are able to reproduce the issue so we can re-open it. 🙂
This successfully silences the errors I'm excepting by returning
true
. But it's not throwing on the otherconsole.error
instances in the same component.