1. 首页
  2. 考试认证
  3. 其它
  4. mocksy 模拟Node.js http服务器进行测试。反刍请求对象

mocksy 模拟Node.js http服务器进行测试。反刍请求对象

上传者: 2024-09-16 20:24:29上传 ZIP文件 3.02KB 热度 8次
嘲讽模拟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
用户评论