@@ -300,16 +300,23 @@ test("each(Function)", function() {
300
300
} ) ;
301
301
302
302
test ( "index(Object)" , function ( ) {
303
- expect ( 8 ) ;
304
- equals ( $ ( [ window , document ] ) . index ( window ) , 0 , "Check for index of elements" ) ;
305
- equals ( $ ( [ window , document ] ) . index ( document ) , 1 , "Check for index of elements" ) ;
306
- var inputElements = $ ( '#radio1,#radio2,#check1,#check2' ) ;
303
+ expect ( 10 ) ;
304
+
305
+ var elements = $ ( [ window , document ] ) ,
306
+ inputElements = $ ( '#radio1,#radio2,#check1,#check2' ) ;
307
+
308
+ equals ( elements . index ( window ) , 0 , "Check for index of elements" ) ;
309
+ equals ( elements . index ( document ) , 1 , "Check for index of elements" ) ;
307
310
equals ( inputElements . index ( document . getElementById ( 'radio1' ) ) , 0 , "Check for index of elements" ) ;
308
311
equals ( inputElements . index ( document . getElementById ( 'radio2' ) ) , 1 , "Check for index of elements" ) ;
309
312
equals ( inputElements . index ( document . getElementById ( 'check1' ) ) , 2 , "Check for index of elements" ) ;
310
313
equals ( inputElements . index ( document . getElementById ( 'check2' ) ) , 3 , "Check for index of elements" ) ;
311
314
equals ( inputElements . index ( window ) , - 1 , "Check for not found index" ) ;
312
315
equals ( inputElements . index ( document ) , - 1 , "Check for not found index" ) ;
316
+
317
+ // enabled since [5500]
318
+ equals ( elements . index ( elements ) , 0 , "Pass in a jQuery object" ) ;
319
+ equals ( elements . index ( elements . eq ( 1 ) ) , 1 , "Pass in a jQuery object" ) ;
313
320
} ) ;
314
321
315
322
test ( "attr(String)" , function ( ) {
0 commit comments