From: jeresig Date: Thu, 17 Dec 2009 18:34:38 +0000 (-0500) Subject: Reworked some more of the selector tests as well to clean up after themselves. X-Git-Tag: 1.4a2~24 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ba86cc0294e483752fd76f620aba6d0a4a7a8ee1;p=jquery.git Reworked some more of the selector tests as well to clean up after themselves. --- diff --git a/test/unit/selector.js b/test/unit/selector.js index b8fab0824..065b1d763 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -96,9 +96,11 @@ test("id", function() { t( "All Children of ID", "#foo > *", ["sndp", "en", "sap"] ); t( "All Children of ID with no children", "#firstUL > *", [] ); - jQuery('tName1 AtName2 A
tName1 Div
').appendTo('#main'); + var a = jQuery('
tName1 AtName2 A
tName1 Div
').appendTo('#main'); equals( jQuery("#tName1")[0].id, 'tName1', "ID selector with same value for a name attribute" ); equals( jQuery("#tName2").length, 0, "ID selector non-existing but name attribute on an A tag" ); + a.remove(); + t( "ID Selector on Form with an input that has a name of 'id'", "#lengthtest", ["lengthtest"] ); t( "ID selector with non-existant ancestor", "#asdfasdf #foobar", [] ); // bug #986