JSFiddle - React, Tailwind, and code Playground

HTML

<h1>Open your console.</h1>

JavaScript

$.ajaxTransport(function( options, originalOptions, jqXHR ) {
  console.log("Executing ajaxTransport");
  if(true) {
    return {
      send: function( headers, completeCallback ) {
          completeCallback(404, "error", {});
      },
      abort: function() {
        /* abort code */
      }
    };
  }
});
$.ajax("?jqTrans=" + (+(new Date())))
    .done(function() {
        console.log("ERROR: Should haved failed but didn't!");
    })
    .fail(function() {
        console.log("SUCCESS: Should have failed and did.");  
    });