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 🙂
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 🙂