mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
fix(ngMock): ensure mocked window still provides window.location functionality
This commit is contained in:
parent
cec4ce28b9
commit
07ef1667db
1 changed files with 1 additions and 0 deletions
1
src/ngMock/angular-mocks.js
vendored
1
src/ngMock/angular-mocks.js
vendored
|
|
@ -640,6 +640,7 @@ angular.mock.createMockWindow = function() {
|
|||
var mockWindow = {};
|
||||
var setTimeoutQueue = [];
|
||||
|
||||
mockWindow.location = window.location;
|
||||
mockWindow.document = window.document;
|
||||
mockWindow.getComputedStyle = angular.bind(window, window.getComputedStyle);
|
||||
mockWindow.scrollTo = angular.bind(window, window.scrollTo);
|
||||
|
|
|
|||
Loading…
Reference in a new issue