How do I mock window object? I\'m doing firefox extension and I want to use jasmine for javascript testing.
In my javascript I have
function submi
Yes, You can mock window object.
The first thing you will have to do is make one change in your JS code : Replace window with $window.
Then, You can mock window using below code:
var window = {
arguments : ['url']
};
now in your spec file : in beforeEach block
$controller('controllerName', {$window : window});