chai-axios:使用Chai和Axios测试HTTP服务器

时间:2021-05-28 18:00:38
【文件属性】:
文件名称:chai-axios:使用Chai和Axios测试HTTP服务器
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-28 18:00:38
JavaScript 柴阿西奥斯 使用chai和axios测试HTTP服务器,请查看以获取更多信息。 安装 $ npm install --save-dev chai-axios 用法 const express = require ( 'express' ) const app = require ( 'app' ) app . get ( '/' , ( req , res ) => res . send ( req . get ( 'host' ) ) ) const chai = require ( 'chai' ) const chaiAxios = require ( 'chai-axios' ) chai . use ( chai ) axiosist ( app ) . get ( '/' ) . then ( response => { chai . assert . strict
【文件预览】:
chai-axios-master
----.gitignore(914B)
----package.json(811B)
----.npmrc(20B)
----.travis.yml(173B)
----LICENSE(1KB)
----index.js(91B)
----test.js(503B)
----README.md(1KB)
----.editorconfig(225B)

网友评论