私はこれに似たJavascriptを設定しています:
function a()
{
// some logic...
b();
};
function b()
{
window.location = "anotherPage"
};
Jasmineテストでは、テストa()したいのですが、リダイレクトを発生させたくありません。
私は試した:
spyOn(instance, 'b').andCallFake(function() { });
but that still is causing a redirect. Perhaps because a() is calling b() and not Jasmine calling b().