I\'m testing a component which subscribe router params. Every test pass and everything works fine. But if I look in the console, I can see an error:
Error
So my situation was similar, but not exactly the same: I'm just putting this here in case someone else finds it helpful. When unit testing with Jamine/Karma I was getting
'ERROR: 'Error during cleanup of component','
It turns out that was because I wasn't properly handling my observables, and they didn't have an error function on them. So the fix was adding an error function:
this.entityService.subscribe((items) => {
///Do work
},
error => {
this.errorEventBus.throw(error);
});