]> source.dussan.org Git - jquery.git/commitdiff
Add a test for index()
authorYehuda Katz <wycats@gmail.com>
Thu, 16 Jul 2009 07:32:17 +0000 (07:32 +0000)
committerYehuda Katz <wycats@gmail.com>
Thu, 16 Jul 2009 07:32:17 +0000 (07:32 +0000)
test/unit/core.js

index 0f6d5b34ea38e64c48b781edc389e5c75dc67418..a6f490c4739ddb5c2c131a640c5ae932fd6bdd56 100644 (file)
@@ -386,6 +386,12 @@ test("each(Function)", function() {
        ok( pass, "Execute a function, Relative" );
 });
 
+test("index()", function() {
+       expect(1);
+
+       equals( jQuery("#text2").index(), 2, "Returns the index of a child amongst its siblings" )
+});
+
 test("index(Object|String|undefined)", function() {
        expect(16);