browserify / browserify/http-browserify
Allow XMLHttpRequest to be mocked by test frameworks (e.g., jasmine-ajax; sinon)
- Lingua principale
- JavaScript
- Stelle
- 245
- Fork
- 104
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- testing-qa
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100