X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fcore.js;h=ade34152757f8a362c75a76f0738451f4c9f2369;hb=c41fab1eb099cd284b65c0d37431adfb38f4106a;hp=c51f053882344e6a5b227e7813a93be9e7c4e8bb;hpb=3a80de1c7a67fc48908b37cfbd8806a265488723;p=jquery.git diff --git a/test/unit/core.js b/test/unit/core.js index c51f053..ade3415 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -63,7 +63,7 @@ test("selector state", function() { var test; - test = jQuery(); + test = jQuery(undefined); equals( test.selector, "", "Empty jQuery Selector" ); equals( test.context, undefined, "Empty jQuery Context" ); @@ -373,7 +373,7 @@ test("each(Function)", function() { }); test("index(Object|String|undefined)", function() { - expect(15); + expect(16); var elements = jQuery([window, document]), inputElements = jQuery('#radio1,#radio2,#check1,#check2'); @@ -399,6 +399,7 @@ test("index(Object|String|undefined)", function() { equals( jQuery('#text2').index(), 2, "Check for index amongst siblings" ); equals( jQuery('#form').children().eq(4).index(), 4, "Check for index amongst siblings" ); equals( jQuery('#radio2').index('#form :radio') , 1, "Check for index within a selector" ); + equals( jQuery('#form :radio').index( jQuery('#radio2') ), 1, "Check for index within a selector" ); equals( jQuery('#radio2').index('#form :text') , -1, "Check for index not found within a selector" ); });