Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow XMLHttpRequest to be mocked by test frameworks (e.g., jasmine-ajax; sinon) #68

Open
cacieprins opened this issue Oct 29, 2014 · 2 comments

Comments

@cacieprins
Copy link

Currently the local xhrHttp is defined at require-time.

Unfortunately, libraries for mocking out XMLHttpRequests that rely on replacing global.XMLHttpRequest with a mock do not play nicely with this - you've already gained a reference to the real XMLHttpRequest by the time they replace the global.XMLHttpRequest reference.

Will be submitting a pull request to fix.

@jednano
Copy link

jednano commented Nov 26, 2014

Any progress on this @jonprins?

@cacieprins
Copy link
Author

My pull request is being ignored :(

I may clean it up and re-submit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants