@@ -53,11 +53,11 @@ test( "jQuery(html) loose rules", function() {
5353 }
5454} ) ;
5555
56- // Selector quoting doesn't work in IE8
57- if ( ! document . querySelector ) {
56+ // Selector quoting doesn't work in IE<8
57+ if ( document . querySelector ) {
5858
5959QUnit . test ( "Attribute selectors with unquoted hashes" , function ( assert ) {
60- expect ( 31 ) ;
60+ expect ( 29 ) ;
6161
6262 var markup = jQuery (
6363 "<div>" +
@@ -82,7 +82,6 @@ QUnit.test( "Attribute selectors with unquoted hashes", function( assert ) {
8282 // Fixable, and gives warning
8383 fixables = [
8484 "a[href=#]" ,
85- "a[href*=#]:not([href=#]):first-child" ,
8685 ".space a[href=#]" ,
8786 "a[href=#some-anchor]" ,
8887 "link[rel*=#stuff]" ,
@@ -103,28 +102,28 @@ QUnit.test( "Attribute selectors with unquoted hashes", function( assert ) {
103102 ] ;
104103
105104 expectNoWarning ( "Perfectly cromulent selectors are unchanged" , function ( ) {
106- okays . forEach ( function ( okay ) {
105+ jQuery . each ( okays , function ( _ , okay ) {
107106 assert . equal ( jQuery ( okay , markup ) . length , 1 , okay ) ;
108107 assert . equal ( markup . find ( okay ) . length , 1 , okay ) ;
109108 } ) ;
110109 } ) ;
111110
112111 expectWarning ( "Values with unquoted hashes are quoted" , fixables . length , function ( ) {
113- fixables . forEach ( function ( fixable ) {
112+ jQuery . each ( fixables , function ( _ , fixable ) {
114113 assert . equal ( jQuery ( fixable , markup ) . length , 1 , fixable ) ;
115114 assert . equal ( markup . find ( fixable ) . length , 1 , fixable ) ;
116115 } ) ;
117116 } ) ;
118117
119118 expectWarning ( "False positives" , positives . length , function ( ) {
120- positives . forEach ( function ( positive ) {
119+ jQuery . each ( positives , function ( _ , positive ) {
121120 assert . equal ( jQuery ( positive , markup ) . length , 1 , positive ) ;
122121 assert . equal ( markup . find ( positive ) . length , 1 , positive ) ;
123122 } ) ;
124123 } ) ;
125124
126125 expectWarning ( "Unfixable cases" , failures . length , function ( ) {
127- failures . forEach ( function ( failure ) {
126+ jQuery . each ( failures , function ( _ , failure ) {
128127 try {
129128 jQuery ( failure , markup ) ;
130129 assert . ok ( false , "Expected jQuery() to die!" ) ;
0 commit comments