sinonjs/sinon

Document how to stub out the network layer

Open

#1459 aperta il 15 giu 2017

Vedi su GitHub
 (4 commenti) (2 reazioni) (1 assegnatario)JavaScript (764 fork)batch import
DocumentationHelp wantedhacktoberfestpinned

Metriche repository

Star
 (9548 star)
Metriche merge PR
 (Merge medio 6g 16h) (15 PR mergiate in 30 g)

Descrizione

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).

Guida contributor