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

feat(adapter-xhr): Support `context` option #216

merged 3 commits into from Jun 6, 2019


None yet
3 participants
Copy link

commented Jun 5, 2019


Add support for mocking the XHR global on a given context (like we currently support with the fetch adapter).

  adapterOptions: { 
    xhr: { context: win }

Motivation and Context

Resolves #204.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)


  • I have added tests to cover my changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • My code follows the code style of this project.
  • My commits and the title of this PR follow the Conventional Commits Specification.
  • I have read the contributing guidelines.

@offirgolan offirgolan requested a review from jasonmit Jun 5, 2019


This comment has been minimized.

Copy link

commented Jun 6, 2019

Thanks for this PR, really need it, hope it get merged early

@jasonmit jasonmit merged commit 65b3c38 into master Jun 6, 2019

4 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@offirgolan offirgolan deleted the xhr-adapter-context branch Jun 6, 2019


This comment has been minimized.

Copy link
Collaborator Author

commented Jun 6, 2019

Released with v2.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.