browserify / browserify/http-browserify

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

オープン
#68 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
245
フォーク
104
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Locate where the local xhrHttp reference is initialized at require time and where XMLHttpRequest is used. Check the existing test setup for browser HTTP requests, then verify that replacing global.XMLHttpRequest with a mocking library is respected when the request is made.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
testing-qa
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。