I have code that i subscribe to activatedRoute.url and inside the subscription im accsessing the sanpshot data. I created mock for the activatedRoute but my test keeps failing .
This is the test code
This is the code i want to test
I have tried to to change the code without the subscription and it worked. But when i try to do it inside the subscripion the test fails.