·write-tests
</>

write-tests

使用正确的模拟模式将测试覆盖率添加到现有代码中。在向未经测试的模块添加测试、为错误编写回归测试或用户要求测试特定文件时使用。处理mockReset:true、vi.hoisted()、转发模式和测试应用程序构建器实用程序。

8安装·4热度·@acedergren

安装

$npx skills add https://github.com/acedergren/agentic-tools --skill write-tests

如何安装 write-tests

通过命令行快速安装 write-tests AI 技能到你的开发环境

  1. 打开终端: 打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 运行安装命令: 复制并运行以下命令:npx skills add https://github.com/acedergren/agentic-tools --skill write-tests
  3. 验证安装: 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

来源:acedergren/agentic-tools。

SKILL.md

查看原文

| Route handler | Test app builder + session simulation + app.inject() | | Repository | Mock DB connection + counter-based execute | | Framework plugin | Real framework instance + selective dependency mocks | | Pure utility | No mocks — test inputs/outputs directly | | Service w/ DI | Mock injected deps via forwarding pattern |

If your test runner uses mockReset: true, most examples from the internet will silently fail.

For complex TDZ cases (multiple interdependent mocks), use the globalThis registry pattern.

使用正确的模拟模式将测试覆盖率添加到现有代码中。在向未经测试的模块添加测试、为错误编写回归测试或用户要求测试特定文件时使用。处理mockReset:true、vi.hoisted()、转发模式和测试应用程序构建器实用程序。 来源:acedergren/agentic-tools。

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/acedergren/agentic-tools --skill write-tests
分类
</>开发工具
认证
收录时间
2026-02-22
更新时间
2026-03-10

Browse more skills from acedergren/agentic-tools

快速解答

什么是 write-tests?

使用正确的模拟模式将测试覆盖率添加到现有代码中。在向未经测试的模块添加测试、为错误编写回归测试或用户要求测试特定文件时使用。处理mockReset:true、vi.hoisted()、转发模式和测试应用程序构建器实用程序。 来源:acedergren/agentic-tools。

如何安装 write-tests?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/acedergren/agentic-tools --skill write-tests 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

这个 Skill 的源码在哪?

https://github.com/acedergren/agentic-tools

详情

分类
</>开发工具
来源
skills.sh
收录时间
2026-02-22