axios test instance:使用Axios测试NodeJS后端 源码
Axios测试实例 使用Axios测试NodeJS后端 安装 npm install axios-test-instance 用法 通过将您的应用程序(可能是Koa应用程序,Express应用程序或HTTP请求处理程序) setTestApp给beforeAll或beforeEach块中的beforeAll来创建Axios测试实例。 导入request并在测试中使用它。 import { request , setTestApp } from 'axios-test-instance' ; import app from './app' ; beforeAll ( async ( ) =>
下载地址
用户评论