X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fcore.js;h=4d04af759a1509a61e1c499a50bb333e2758d11d;hb=fa615bedd47bd8a4b11e8490e26d2c89d1d86e2a;hp=1ec3487d0a94a2af623fcbff862fbc864d47c3e5;hpb=29bf601f3495ced43fbb6152bf9306f2618bb955;p=jquery.git diff --git a/test/unit/core.js b/test/unit/core.js index 1ec3487..4d04af7 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -1352,7 +1352,7 @@ test("val(String/Number)", function() { }); test("html(String)", function() { - expect(13); + expect(17); jQuery.scriptorder = 0; @@ -1381,6 +1381,10 @@ test("html(String)", function() { equals( $div.html( 5 ).html(), '5', 'Setting a number as html' ); equals( $div.html( 0 ).html(), '0', 'Setting a zero as html' ); + reset(); + + jQuery("#main").html('
'); + stop(); jQuery("#main").html(''); @@ -1407,11 +1411,14 @@ test("filter()", function() { }); test("closest()", function() { - expect(4); + expect(6); isSet( jQuery("body").closest("body").get(), q("body"), "closest(body)" ); isSet( jQuery("body").closest("html").get(), q("html"), "closest(html)" ); isSet( jQuery("body").closest("div").get(), [], "closest(div)" ); isSet( jQuery("#main").closest("span,#html").get(), q("html"), "closest(span,#html)" ); + + isSet( jQuery("div:eq(1)").closest("div:first").get(), [], "closest(div:first)" ); + isSet( jQuery("div").closest("body:first div:last").get(), q("divWithNoTabIndex"), "closest(body:first div:last)" ); }); test("not()", function() {