Skip to content

Instantly share code, notes, and snippets.

@jiverson
Last active August 29, 2015 14:08
Show Gist options
  • Save jiverson/3ea4e1c7d65287a61d71 to your computer and use it in GitHub Desktop.
Save jiverson/3ea4e1c7d65287a61d71 to your computer and use it in GitHub Desktop.
mock window in angularjs
var $window;
beforeEach(function () {
module('services.sessionExpiration');
module(function ($provide) {
$window = {
mfConfig: window.mfConfig,
location: {},
document: window.document
};
$provide.constant('$window', $window);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment