I m new to angular 4 and trying to test one of the angular 4 feature router.paramMap from unit tests, Reading route params in fallowing way and working as expected in my applica
I am using a slightly different method of getting the params in my component:
this.id = this.route.snapshot.paramMap.get('id');
And this is what worked for me in the jasmine test:
{ provide: ActivatedRoute, useValue: { snapshot: { paramMap: convertToParamMap({id: 1}) } } }