browserify / browserify/http-browserify

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

Open
#68 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
245
Forks
104
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.