From: Michał Gołębiowski-Owczarek Date: Wed, 15 Mar 2023 10:44:08 +0000 (+0100) Subject: Tests: Test AJAX deprecated event aliases properly X-Git-Tag: 4.0.0-beta~65 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cff2899885c314d32eea42e9eef6ead6e5da5c2f;p=jquery.git Tests: Test AJAX deprecated event aliases properly PR gh-5046 erroneously changed AJAX deprecated event alias usage in deprecated tests to `.on()` calls. This change reverses this mistake. Closes gh-5195 Ref gh-5046 --- diff --git a/test/unit/deprecated.js b/test/unit/deprecated.js index f85209d53..bddd40105 100644 --- a/test/unit/deprecated.js +++ b/test/unit/deprecated.js @@ -97,7 +97,7 @@ QUnit.test( "trigger() shortcuts", function( assert ) { } ); if ( includesModule( "ajax" ) ) { - ajaxTest( "jQuery.ajax() - events with context", 12, function( assert ) { + ajaxTest( "Ajax events aliases (with context)", 12, function( assert ) { var context = document.createElement( "div" ); function event( e ) { @@ -113,10 +113,10 @@ if ( includesModule( "ajax" ) ) { return { setup: function() { jQuery( context ).appendTo( "#foo" ) - .on( "ajaxSend", event ) - .on( "ajaxComplete", event ) - .on( "ajaxError", event ) - .on( "ajaxSuccess", event ); + .ajaxSend( event ) + .ajaxComplete( event ) + .ajaxError( event ) + .ajaxSuccess( event ); }, requests: [ { url: url( "name.html" ),