In my Angular 4 component I have something like:
constructor(private route: ActivatedRoute) { } ngOnInit() { this.myId
Ok, I've found how to mock ActivatedRoute snapshot in the simple way. Something like this works for me:
providers: [MyComponent, { provide: ActivatedRoute, useValue: {snapshot: {params: {'myId': '123'}}} }
Thanks :)