Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit aa64d37

Browse files
vojtajinaIgorMinar
authored andcommitted
Fix unit test in IE7
1 parent 2e51999 commit aa64d37

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/angular-mocks.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,9 @@ MockBrowser.prototype = {
203203
}
204204
return this.cookieHash;
205205
}
206-
}
206+
},
207+
208+
addJs: function(){}
207209
};
208210

209211
angular.service('$browser', function(){

test/AngularSpec.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,8 @@ describe('angular', function(){
454454
return this.childNodes[1];
455455
};
456456

457-
angularInit({autobind: 'child'}, dom);
458457

459-
delete dom.getElementById; //make IE and sortedHtml happy
458+
angularInit({autobind: 'child'}, dom);
460459

461460
expect(sortedHtml(dom)).toEqual('<div foo="{{1+2}}">{{2+3}}' +
462461
'<div bar="7" id="child" ng:bind-attr="{"bar":"{{3+4}}"}">'+

test/testabilityPatch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ function sortedHtml(element, showNgClass) {
215215
attr.name !='style' &&
216216
attr.name.substr(0, 6) != 'jQuery') {
217217
// in IE we need to check for all of these.
218-
if (!/ng-\d+/.exec(attr.name))
218+
if (!/ng-\d+/.exec(attr.name) && attr.name != 'getElementById')
219219
attrs.push(' ' + attr.name + '="' + attr.value + '"');
220220
}
221221
}

0 commit comments

Comments
 (0)