Using the ajax `$.active` does not decrement with 422 responses
$.active is a well-known trick to discover how many pending ajax request there is on a page. Most commonly used in testing.
It turns out that refactoring a $.ajax into this.get('ajax').request broke my tests because when an 422 response is received, a InvalidError is thrown from the jqXHR.done callback, preventing the normal behavior of $.active
Background about the bug in jQuery: https://bugs.jquery.com/ticket/11207
I believe that moving from done/fail to a wrapped promise + then/catch might fix the issue, but I haven't had time to check it. I leave my thoughts here and I'll try to investigate it further another day.
Is there a reason your tests are relying on $.active? If the issue is needing to "wait" until your requests are finished, that should "just work" based on some of the compatibility code we have in the addon.