"tests: moved Generate into own module; fixed QUnit messages"

This commit is contained in:
André Fiedler
2012-03-04 20:15:10 +00:00
5 changed files with 63 additions and 18 deletions

View File

@@ -1,8 +1,9 @@
// declare vars (preventing JSHint messages)
/* this breaks the testing for IE<9, haven't really looked into why
var test = test || function(){},
QUnit = QUnit || {},
_html2canvas = _html2canvas || {};
*/
module("CSS");
$(function() {
@@ -144,6 +145,6 @@ $(function() {
});
});
// TODO add backgroundPosition % tests
// TODO add backgroundPosition % tests
});

18
tests/qunit/unit/utils.js Normal file
View File

@@ -0,0 +1,18 @@
$(function() {
var el = $('#qunit-fixture');
test('Children()', 1, function() {
var arr = [],
cont = el.contents();
$.each(cont, function(i,e){
arr.push(e);
});
// text nodes differ
QUnit.equal( _html2canvas.Util.Children(el[0]), arr, "Util.Children === jQuery.children()" );
});
});