I have an Angularjs application that uses simple javascript confirm before executing some actions.
function TokenControll
Another option would be to directly create a spy and automatically return true:
true
//Jasmine 2.0 spyOn(window, 'confirm').and.callFake(function () { return true; }); //Jasmine 1.3 spyOn(window, 'confirm').andCallFake(function () { return true; });