MockHttpRequest
MockHttpRequest copied to clipboard
A mock implementation of XMLHttpRequest for unit testing
Hi! Package version at https://www.npmjs.com/package/mock-xhr seems a little bit outdated and doesn't work with (at least) PhantomJS under Karma. Could you publish? Thanks!
Can you add bower support?
``` npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/MockHttpRequest npm ERR! 404 npm ERR! 404 'MockHttpRequest' is not in the npm registry. npm ERR! 404 Your package name...
Hello, I want to simulate the timeout due to network connection latency, How can we do it? ``` function load(src) { var oReq = new XMLHttpRequest(); oReq.timeout = 1000; //1sec...
This is needed to test with CORS requests.
Would be great to see this module also on NPM any time soon.