Skip to content
Permalink
Browse files

another unit test for index method

  • Loading branch information
brandonaaron committed May 7, 2009
1 parent 8118917 commit c41fab1eb099cd284b65c0d37431adfb38f4106a
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/unit/core.js
@@ -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" );
});

0 comments on commit c41fab1

Please sign in to comment.
You can’t perform that action at this time.