标签: unit-testing angular typescript
我正在尝试为component test运行Angular2,我必须检查调用URL的函数,该URL允许本地运行程序启动。该功能正在运行,但它是breaking the unit tests。
component test
Angular2
breaking the unit tests
单元测试失败,因为Some of your tests did a full page reload!
Some of your tests did a full page reload!
有没有办法捕获window.location.href来电obtaining the called URL并阻止其刷新。
window.location.href
obtaining the called URL