mock-express-request-response:使用Jest或sinon对Express请求响应对象进行窃听

时间:2021-02-05 07:56:01
【文件属性】:
文件名称:mock-express-request-response:使用Jest或sinon对Express请求响应对象进行窃听
文件大小:87KB
文件格式:ZIP
更新时间:2021-02-05 07:56:01
testing express jest sinon jest-mocking 用Jest或sinon模拟请求/响应 全文发布在 要求 节点10 npm 6 建立 克隆存储库 运行npm install 运行npm start (以在本地启动应用程序)或npm t以运行测试。 npm脚本 npm t ( npm run test )将同时运行基于ava和jest的测试套件。 npm start将启动应用程序服务器(默认PORT:3000,可以使用PORT环境变量覆盖) npx jest将仅运行基于jest的测试 npx ava将仅运行基于ava的测试 要求 登录 curl --request POST \ --url http://localhost:3000
【文件预览】:
mock-express-request-response-master
----.dependabot()
--------config.yml(290B)
----.github()
--------FUNDING.yml(15B)
--------workflows()
----header-auth-middleware.sinon-test.js(2KB)
----express-handlers.jest-test.js(3KB)
----app.js(633B)
----header-auth-middleware.jest-test.js(2KB)
----express-handlers.sinon-test.js(3KB)
----express-handlers.js(2KB)
----LICENSE(1KB)
----README.md(5KB)
----header-auth-middleware.js(597B)
----.editorconfig(215B)
----.gitignore(1KB)
----package-lock.json(313KB)
----package.json(557B)

网友评论