In this pseudo code example
this.someService.someMethod().subscribe(
(data) =>
{
throw Exception
}
(err) =>
{
throw Exception
}
How do I catch an error that is thrown inside the subscribe methods?
My specific scenario is that I want to write a unit test for a case that I know will throw an exception
I can't put try/catch logic inside the methods themselves, I want the catch inside the spec.ts file
Edit, just to repeat
I can't put try/catch logic inside the methods themselves, I want the catch inside the spec.ts file