HTTP 模拟和预期测试库 Nock

码农软件 · 软件分类 · Node.js 扩展 · 2019-04-14 21:44:22

软件介绍

Nock 是一个 HTTP 模拟和预期测试库,用于 Node.js 平台。用来测试 HTTP 请求。

示例代码:

var nock = require('nock');

var couchdb = nock('http://myapp.iriscouch.com')
    .get('/users/1')
    .reply(200, {
      _id: '123ABC',
      _rev: '946B7D1C',
      username: 'pgte',
      email: 'pedro.teixeira@gmail.com'
     });

本文地址:https://codercto.com/soft/d/3595.html

Looking For a Challenge

Looking For a Challenge

the University of Warsaw / the University of Warsaw / 2012-11 / 0

LOOKING FOR PROGRAMMING CHALLENGES? Then this book is for you! Whether it's the feeling of great satisfaction from solving a complex problem set, or the frustration of being unable to solve a task,......一起来看看 《Looking For a Challenge》 这本书的介绍吧!

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具