@@ -840,9 +840,7 @@ test("append(String|Element|Array<Element>|jQuery)", function() {
840
840
equals ( expected , jQuery ( '#sap' ) . text ( ) , "Check for appending of array of elements" ) ;
841
841
842
842
reset ( ) ;
843
- expected = document . querySelectorAll ?
844
- "This link has class=\"blog\": Simon Willison's WeblogYahooTry them out:" :
845
- "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo" ;
843
+ expected = "This link has class=\"blog\": Simon Willison's WeblogYahooTry them out:" ;
846
844
jQuery ( '#sap' ) . append ( jQuery ( "#first, #yahoo" ) ) ;
847
845
equals ( expected , jQuery ( '#sap' ) . text ( ) , "Check for appending of jQuery object" ) ;
848
846
@@ -929,9 +927,7 @@ test("appendTo(String|Element|Array<Element>|jQuery)", function() {
929
927
ok ( jQuery ( document . createElement ( "script" ) ) . appendTo ( "body" ) . length , "Make sure a disconnected script can be appended." ) ;
930
928
931
929
reset ( ) ;
932
- expected = document . querySelectorAll ?
933
- "This link has class=\"blog\": Simon Willison's WeblogYahooTry them out:" :
934
- "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo" ;
930
+ expected = "This link has class=\"blog\": Simon Willison's WeblogYahooTry them out:" ;
935
931
jQuery ( "#first, #yahoo" ) . appendTo ( '#sap' ) ;
936
932
equals ( expected , jQuery ( '#sap' ) . text ( ) , "Check for appending of jQuery object" ) ;
937
933
@@ -958,9 +954,7 @@ test("prepend(String|Element|Array<Element>|jQuery)", function() {
958
954
equals ( expected , jQuery ( '#sap' ) . text ( ) , "Check for prepending of array of elements" ) ;
959
955
960
956
reset ( ) ;
961
- expected = document . querySelectorAll ?
962
- "YahooTry them out:This link has class=\"blog\": Simon Willison's Weblog" :
963
- "Try them out:YahooThis link has class=\"blog\": Simon Willison's Weblog" ;
957
+ expected = "YahooTry them out:This link has class=\"blog\": Simon Willison's Weblog" ;
964
958
jQuery ( '#sap' ) . prepend ( jQuery ( "#first, #yahoo" ) ) ;
965
959
equals ( expected , jQuery ( '#sap' ) . text ( ) , "Check for prepending of jQuery object" ) ;
966
960
} ) ;
@@ -1011,9 +1005,7 @@ test("before(String|Element|Array<Element>|jQuery)", function() {
1011
1005
equals ( expected , jQuery ( '#en' ) . text ( ) , "Insert array of elements before" ) ;
1012
1006
1013
1007
reset ( ) ;
1014
- expected = document . querySelectorAll ?
1015
- "This is a normal link: diveintomarkTry them out:Yahoo" :
1016
- "This is a normal link: Try them out:diveintomarkYahoo" ;
1008
+ expected = "This is a normal link: diveintomarkTry them out:Yahoo" ;
1017
1009
jQuery ( '#yahoo' ) . before ( jQuery ( "#first, #mark" ) ) ;
1018
1010
equals ( expected , jQuery ( '#en' ) . text ( ) , "Insert jQuery before" ) ;
1019
1011
} ) ;
@@ -1035,9 +1027,7 @@ test("insertBefore(String|Element|Array<Element>|jQuery)", function() {
1035
1027
equals ( expected , jQuery ( '#en' ) . text ( ) , "Insert array of elements before" ) ;
1036
1028
1037
1029
reset ( ) ;
1038
- expected = document . querySelectorAll ?
1039
- "This is a normal link: diveintomarkTry them out:Yahoo" :
1040
- "This is a normal link: Try them out:diveintomarkYahoo" ;
1030
+ expected = "This is a normal link: diveintomarkTry them out:Yahoo" ;
1041
1031
jQuery ( "#first, #mark" ) . insertBefore ( '#yahoo' ) ;
1042
1032
equals ( expected , jQuery ( '#en' ) . text ( ) , "Insert jQuery before" ) ;
1043
1033
} ) ;
@@ -1059,9 +1049,7 @@ test("after(String|Element|Array<Element>|jQuery)", function() {
1059
1049
equals ( expected , jQuery ( '#en' ) . text ( ) , "Insert array of elements after" ) ;
1060
1050
1061
1051
reset ( ) ;
1062
- expected = document . querySelectorAll ?
1063
- "This is a normal link: YahoodiveintomarkTry them out:" :
1064
- "This is a normal link: YahooTry them out:diveintomark" ;
1052
+ expected = "This is a normal link: YahoodiveintomarkTry them out:" ;
1065
1053
jQuery ( '#yahoo' ) . after ( jQuery ( "#first, #mark" ) ) ;
1066
1054
equals ( expected , jQuery ( '#en' ) . text ( ) , "Insert jQuery after" ) ;
1067
1055
} ) ;
@@ -1453,7 +1441,7 @@ test("closest()", function() {
1453
1441
isSet ( jQuery ( "#main" ) . closest ( "span,#html" ) . get ( ) , q ( "html" ) , "closest(span,#html)" ) ;
1454
1442
1455
1443
isSet ( jQuery ( "div:eq(1)" ) . closest ( "div:first" ) . get ( ) , [ ] , "closest(div:first)" ) ;
1456
- isSet ( jQuery ( "div" ) . closest ( "body:first div:last" ) . get ( ) , q ( "divWithNoTabIndex " ) , "closest(body:first div:last)" ) ;
1444
+ isSet ( jQuery ( "div" ) . closest ( "body:first div:last" ) . get ( ) , q ( "liveHandlerOrder " ) , "closest(body:first div:last)" ) ;
1457
1445
} ) ;
1458
1446
1459
1447
test ( "not()" , function ( ) {
@@ -1479,16 +1467,16 @@ test("andSelf()", function() {
1479
1467
isSet ( jQuery ( "#en" ) . siblings ( ) . andSelf ( ) . get ( ) , q ( "sndp" , "sap" , "en" ) , "Check for siblings and self" ) ;
1480
1468
isSet ( jQuery ( "#foo" ) . children ( ) . andSelf ( ) . get ( ) , q ( "sndp" , "en" , "sap" , "foo" ) , "Check for children and self" ) ;
1481
1469
isSet ( jQuery ( "#sndp, #en" ) . parent ( ) . andSelf ( ) . get ( ) , q ( "foo" , "sndp" , "en" ) , "Check for parent and self" ) ;
1482
- isSet ( jQuery ( "#groups" ) . parents ( "p, div" ) . andSelf ( ) . get ( ) , q ( "ap " , "main " , "groups" ) , "Check for parents and self" ) ;
1470
+ isSet ( jQuery ( "#groups" ) . parents ( "p, div" ) . andSelf ( ) . get ( ) , q ( "main " , "ap " , "groups" ) , "Check for parents and self" ) ;
1483
1471
} ) ;
1484
1472
1485
1473
test ( "siblings([String])" , function ( ) {
1486
1474
expect ( 5 ) ;
1487
1475
isSet ( jQuery ( "#en" ) . siblings ( ) . get ( ) , q ( "sndp" , "sap" ) , "Check for siblings" ) ;
1488
1476
isSet ( jQuery ( "#sndp" ) . siblings ( ":has(code)" ) . get ( ) , q ( "sap" ) , "Check for filtered siblings (has code child element)" ) ;
1489
1477
isSet ( jQuery ( "#sndp" ) . siblings ( ":has(a)" ) . get ( ) , q ( "en" , "sap" ) , "Check for filtered siblings (has anchor child element)" ) ;
1490
- isSet ( jQuery ( "#foo" ) . siblings ( "form, b" ) . get ( ) , q ( "form" , "lengthtest" , "name-tests" , "testForm" , "floatTest ") , "Check for multiple filters" ) ;
1491
- var set = document . querySelectorAll ? q ( "en" , "sap" , "sndp" ) : q ( "sndp" , "sap" , "en ") ;
1478
+ isSet ( jQuery ( "#foo" ) . siblings ( "form, b" ) . get ( ) , q ( "form" , "floatTest" , " lengthtest", "name-tests" , "testForm" ) , "Check for multiple filters" ) ;
1479
+ var set = q ( "en" , "sap" , "sndp" ) ;
1492
1480
isSet ( jQuery ( "#en, #sndp" ) . siblings ( ) . get ( ) , set , "Check for unique results from siblings" ) ;
1493
1481
} ) ;
1494
1482
@@ -1513,7 +1501,7 @@ test("parents([String])", function() {
1513
1501
equals ( jQuery ( "#groups" ) . parents ( ) [ 0 ] . id , "ap" , "Simple parents check" ) ;
1514
1502
equals ( jQuery ( "#groups" ) . parents ( "p" ) [ 0 ] . id , "ap" , "Filtered parents check" ) ;
1515
1503
equals ( jQuery ( "#groups" ) . parents ( "div" ) [ 0 ] . id , "main" , "Filtered parents check2" ) ;
1516
- isSet ( jQuery ( "#groups" ) . parents ( "p, div" ) . get ( ) , q ( "ap " , "main " ) , "Check for multiple filters" ) ;
1504
+ isSet ( jQuery ( "#groups" ) . parents ( "p, div" ) . get ( ) , q ( "main " , "ap " ) , "Check for multiple filters" ) ;
1517
1505
isSet ( jQuery ( "#en, #sndp" ) . parents ( ) . get ( ) , q ( "foo" , "main" , "dl" , "body" , "html" ) , "Check for unique results from parents" ) ;
1518
1506
} ) ;
1519
1507
0 commit comments