sinonjs/sinon

Document how to stub out the network layer

开放

#1,459 创建于 2017年6月15日

 (4 条评论) (2 个反应) (1 位负责人)JavaScript (764 个派生)batch import
DocumentationHelp wantedhacktoberfestpinned

仓库指标

星标
 (9,548 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南