browserify / browserify/http-browserify

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

Abierto
#68 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
245
Forks
104
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
testing-qa
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.