【文件属性】:
文件名称:koa-sham:在不启动http服务器的情况下向Koa应用程序发送虚假请求
文件大小:61KB
文件格式:ZIP
更新时间:2021-02-03 17:45:53
mock http koa test fake
深水
在不启动http服务器的情况下向Koa应用程序发送虚假请求。
稍后将支持发送multipart数据。
安装
$ npm i koa - sham -- save
用法
const Koa = require ( 'koa' ) ;
const sham = require ( 'koa-sham' ) ;
const app = new Koa ( ) ;
app . use ( ctx => {
ctx . body = { status : 1 } ;
} ) ;
sham ( app , ( err , res , body ) => {
console . lo
【文件预览】:
koa-sham-master
----.eslintrc.json(672B)
----.npmignore(172B)
----LICENSE(1KB)
----test()
--------index.spec.js(15KB)
--------app()
----README.md(3KB)
----.gitignore(914B)
----index.js(4KB)
----.eslintignore(0B)
----package-lock.json(245KB)
----package.json(2KB)