Angular2 Window.Location.HREF UNIT Test

I am trying to run component testfor Angular2, I need to check a function that calls a URL that allows a local launcher to run. The function works, however it does breaking the unit tests.

unit test fails because Some of your tests did a full page reload!

Is there a way to capture the call window.location.href obtaining the called URLand prevent it from updating.

+4
source share

Source: https://habr.com/ru/post/1670935/


All Articles