sinonjs/sinon

Document how to stub out the network layer

Open

#1.459 aberto em 15 de jun. de 2017

Ver no GitHub
 (4 comments) (2 reactions) (1 assignee)JavaScript (764 forks)batch import
DocumentationHelp wantedhacktoberfestpinned

Métricas do repositório

Stars
 (9.548 stars)
Métricas de merge de PR
 (Mesclagem média 6d 16h) (15 fundiu PRs em 30d)

Description

If one tracks the sinon tag on Stack Overflow one can see that a lot of the questions involve stubbing out the network layer. A lot of people try using the networking utilities in Sinon when doing testing in Node - ultimately failing as they fail to see that XHR is not supported in Node. Example question.

We should create a how-to on stubbing out network requests in Node and the browser (perhaps even for the same module).

Guia do colaborador