working on jQuery passing tests

This commit is contained in:
Misko Hevery
2010-04-22 15:50:20 -07:00
parent d7416c4c82
commit 2a9669e1d8
6 changed files with 21 additions and 9 deletions

View File

@@ -1,7 +1,11 @@
jstd = jstestdriver;
dump = bind(jstd.console, jstd.console.log);
var NBSP = jqLite(' ').text();
var NBSP = (function(){
var div = document.createElement('div');
div.innerHtml = ' ';
return msie ? div.innerText : div.textContent;
})();
function nakedExpect(obj) {
return expect(angular.fromJson(angular.toJson(obj)));
@@ -82,6 +86,12 @@ function sortedHtml(element) {
}
}
style.sort();
var tmp = style;
style = [];
foreach(tmp, function(value){
if (!value.match(/^max[^\-]/))
style.push(value);
});
if (style.length) {
html += ' style="' + style.join('; ') + ';"';
}