diff --git a/test/ng/locationSpec.js b/test/ng/locationSpec.js index e7627a0531a2..626cfdccbae4 100644 --- a/test/ng/locationSpec.js +++ b/test/ng/locationSpec.js @@ -2330,6 +2330,9 @@ describe('$location', function() { $windowProvider.$get = function() { var win = {}; angular.extend(win, window); + // Work around Window `length` attribute which prevents jqLite() from + // wrapping around the Window node + delete win.length; win.history = { state: options.state || null, replaceState: function(state, title, url) {