Testing AJAX is tricky, particularly when you want to cover all cases like CORS, JSONP and so on. For that reason, we have released an open source mock ajax server that you can easily run locally or deploy to e.g. Heroku.

We’re using it to test our ajax modules via BrowserStack using our mock ajax server. Fell free to give it a whirl as well.