Last active
August 29, 2015 14:08
-
-
Save jiverson/3ea4e1c7d65287a61d71 to your computer and use it in GitHub Desktop.
mock window in angularjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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