mercredi 19 avril 2017

Testing navigation with relativeto

I am testing a router navigate but with an added relativeTo object.

this.router.navigate(['./identification'], { relativeTo: this.activatedRoute });

When trying:

expect(fakeRouter.navigate).toHaveBeenCalledWith(['./identification']);

I get he is also expecting the relativeTo object, but if i provide it, it is obviously undefined.

Can i single out just the first part of the navigation for testing?

Aucun commentaire:

Enregistrer un commentaire