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 test frameworks to mock out XMLHttpRequest #69

Closed
wants to merge 2 commits into from
Closed

Allow test frameworks to mock out XMLHttpRequest #69

wants to merge 2 commits into from

Conversation

cacieprins
Copy link

  • instead of saving a reference to global.XMLHttpRequest / ActiveX,
    return the reference each time http.request() is called
  • performance impact should be negligible
  • potential concerns about malicious injected scripts hijacking
    XMLHttpRequest... considering jQuery initializes XHR() the same way,
    it shouldn't be an issue.
  • normalized some semicolon usage
  • fixes Allow XMLHttpRequest to be mocked by test frameworks (e.g., jasmine-ajax; sinon) #68

Jon Prins added 2 commits October 29, 2014 11:27
- instead of saving a reference to global.XMLHttpRequest / ActiveX,
  return the reference each time http.request() is called
- performance impact should be negligible
- potential concerns about malicious injected scripts hijacking
  XMLHttpRequest... considering jQuery initializes XHR() the same way,
  it shouldn't be an issue.
- normalized some semicolon usage
@nchase
Copy link

nchase commented May 22, 2015

@substack I need this, is there any chance that this could get merged in?

This pull request was closed.
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 this pull request may close these issues.

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