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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: I made a CLI that will use GPT4 to generate unit tests

4 点作者 justinbstrong超过 1 年前
I always hated tests, so I&#x27;ve gone and just automated the task away. You&#x27;ll get out complete tests that are known to pass from this tool. If you just want to try it out, here&#x27;s the command to run for the entire project<p><pre><code> npx deepunit -- --a </code></pre> To run for just a specific file(s)<p><pre><code> npx deepunit -- --f path&#x2F;to&#x2F;file.ts </code></pre> For complete documentation: https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;deepunit<p>Behinds the scenes there&#x27;s a whole lot going on to get code that runs and compiles. I&#x27;m sure you&#x27;ve already used ChatGPT to write a simple function and found that most of the time there are small things to fix up before it&#x27;s ready to run. A ton of time was spent handling each of those edge cases to ensure that the output is a test that runs and passes.

暂无评论

暂无评论