How to expect the ajax request in Appium with Mocha

Hi there,

I am working with Appium to test a web application. The test I want to write is to test whether a xhr requests is triggered when a button is clicked.
The source code of event listener is:

$('a').on('click', function(e) {
            if (isLinkClick) {
              var href, data;

              if (e.preventDefault) {

              href = $(this).attr('href');
              data = {
                "data" : [ {
                  "dtk" : key,
                  "link" : href
                } ]

                type : 'POST',
                url : dtkUrlClick,
                data : JSON.stringify(data),
                success : function() {
                error : function() {

And the test I am writing with wd is like below:

 it('should send out xhr post', function() {

Then i have not hint to implement the test to check whether the xhr request is sent.
Though I understand that this kind of test is easy to implement in a unit test with angular and jasmine, but it is a lightweight project, we do not want to introduce angular and its unit test runner and framework to do the work. So I’d like to see whether there is a way to use mocha to test with appium.