@@ -226,24 +226,27 @@ test( "globalEval execution after script injection (#7862)", 1, function() {
226226 ok ( window . strictEvalTest - now < 500 , "Code executed synchronously" ) ;
227227} ) ;
228228
229- test ( "noConflict" , function ( ) {
230- expect ( 7 ) ;
229+ // This is not run in AMD mode
230+ if ( jQuery . noConflict ) {
231+ test ( "noConflict" , function ( ) {
232+ expect ( 7 ) ;
231233
232- var $$ = jQuery ;
234+ var $$ = jQuery ;
233235
234- strictEqual ( jQuery , jQuery . noConflict ( ) , "noConflict returned the jQuery object" ) ;
235- strictEqual ( window [ "jQuery" ] , $$ , "Make sure jQuery wasn't touched." ) ;
236- strictEqual ( window [ "$" ] , original$ , "Make sure $ was reverted." ) ;
236+ strictEqual ( jQuery , jQuery . noConflict ( ) , "noConflict returned the jQuery object" ) ;
237+ strictEqual ( window [ "jQuery" ] , $$ , "Make sure jQuery wasn't touched." ) ;
238+ strictEqual ( window [ "$" ] , original$ , "Make sure $ was reverted." ) ;
237239
238- jQuery = $ = $$ ;
240+ jQuery = $ = $$ ;
239241
240- strictEqual ( jQuery . noConflict ( true ) , $$ , "noConflict returned the jQuery object" ) ;
241- strictEqual ( window [ "jQuery" ] , originaljQuery , "Make sure jQuery was reverted." ) ;
242- strictEqual ( window [ "$" ] , original$ , "Make sure $ was reverted." ) ;
243- ok ( $$ ( ) . pushStack ( [ ] ) , "Make sure that jQuery still works." ) ;
242+ strictEqual ( jQuery . noConflict ( true ) , $$ , "noConflict returned the jQuery object" ) ;
243+ strictEqual ( window [ "jQuery" ] , originaljQuery , "Make sure jQuery was reverted." ) ;
244+ strictEqual ( window [ "$" ] , original$ , "Make sure $ was reverted." ) ;
245+ ok ( $$ ( ) . pushStack ( [ ] ) , "Make sure that jQuery still works." ) ;
244246
245- window [ "jQuery" ] = jQuery = $$ ;
246- } ) ;
247+ window [ "jQuery" ] = jQuery = $$ ;
248+ } ) ;
249+ }
247250
248251test ( "trim" , function ( ) {
249252 expect ( 13 ) ;
0 commit comments