@@ -234,24 +234,27 @@ test( "globalEval execution after script injection (#7862)", 1, function() {
234234 ok ( window . strictEvalTest - now < 500 , "Code executed synchronously" ) ;
235235} ) ;
236236
237- test ( "noConflict" , function ( ) {
238- expect ( 7 ) ;
237+ // This is not run in AMD mode
238+ if ( jQuery . noConflict ) {
239+ test ( "noConflict" , function ( ) {
240+ expect ( 7 ) ;
239241
240- var $$ = jQuery ;
242+ var $$ = jQuery ;
241243
242- strictEqual ( jQuery , jQuery . noConflict ( ) , "noConflict returned the jQuery object" ) ;
243- strictEqual ( window [ "jQuery" ] , $$ , "Make sure jQuery wasn't touched." ) ;
244- strictEqual ( window [ "$" ] , original$ , "Make sure $ was reverted." ) ;
244+ strictEqual ( jQuery , jQuery . noConflict ( ) , "noConflict returned the jQuery object" ) ;
245+ strictEqual ( window [ "jQuery" ] , $$ , "Make sure jQuery wasn't touched." ) ;
246+ strictEqual ( window [ "$" ] , original$ , "Make sure $ was reverted." ) ;
245247
246- jQuery = $ = $$ ;
248+ jQuery = $ = $$ ;
247249
248- strictEqual ( jQuery . noConflict ( true ) , $$ , "noConflict returned the jQuery object" ) ;
249- strictEqual ( window [ "jQuery" ] , originaljQuery , "Make sure jQuery was reverted." ) ;
250- strictEqual ( window [ "$" ] , original$ , "Make sure $ was reverted." ) ;
251- ok ( $$ ( ) . pushStack ( [ ] ) , "Make sure that jQuery still works." ) ;
250+ strictEqual ( jQuery . noConflict ( true ) , $$ , "noConflict returned the jQuery object" ) ;
251+ strictEqual ( window [ "jQuery" ] , originaljQuery , "Make sure jQuery was reverted." ) ;
252+ strictEqual ( window [ "$" ] , original$ , "Make sure $ was reverted." ) ;
253+ ok ( $$ ( ) . pushStack ( [ ] ) , "Make sure that jQuery still works." ) ;
252254
253- window [ "jQuery" ] = jQuery = $$ ;
254- } ) ;
255+ window [ "jQuery" ] = jQuery = $$ ;
256+ } ) ;
257+ }
255258
256259test ( "trim" , function ( ) {
257260 expect ( 13 ) ;
0 commit comments