mocksy 模拟Node.js http服务器进行测试。反刍请求对象
嘲讽模拟Node.js http服务器进行测试。反刍请求对象。安装npm install mocksy --save-dev用法var Mocksy = require ( 'mocksy' ) ; var mocksy = new Mocksy ( { port : 4321 } ) ; // In your test runner describe ( 'Some http endpoint' , function ( ) { beforeEach ( function ( done ) { mocksy . start ( done ) ; } ) ; afterEach ( function ( done ) { mocksy . stop ( done ) ; } ) ; it ( 'should just work, ri
用户评论