How can I test the onreadystatechange on XMLHttpRequest or pure Javascript AJAX without jQuery? I\'m doing this because I\'m developing Firefox extension. I guess I have to use
As mention in the comments with SinonJS you can easily mock the XHR object / create a fake server.