TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: mock v0.6.0

1 点作者 dhuan_大约 2 年前
mock enables you to quickly set up HTTP APIs. As effortlessly as possible. Additionally, it has test-assertion capabilities that facilitates E2E tests - assert that endpoint x has been requested with body fields y and z. The major difference from other similar tools is that mock is language agnostic - setting up complex endpoint responses with conditional content is all done declaratively through config files. Also running test assertions also is done through HTTP calls, not requiring actual code. Can be done through code as well, but that&#x27;s an alternative.<p>Setting up your CI pipelines to install it is just a matter of downloading the tarball from github. And it doesn&#x27;t matter which programming language your codebase to be tested is using - mock&#x27;s functionalities are designed to be independent of the stack it&#x27;s being used with.<p>Here&#x27;s a few highlights of the recent versions:<p>- Endpoint handlers can be written as shell scripts. What your script outputs (stdout) ends up as the response; - Endpoints can be static file servers;<p>Check the user guide to know more about the mentioned functionalities.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;dhuan&#x2F;mock&#x2F;blob&#x2F;master&#x2F;user_guide.md">https:&#x2F;&#x2F;github.com&#x2F;dhuan&#x2F;mock&#x2F;blob&#x2F;master&#x2F;user_guide.md</a>

暂无评论

暂无评论