test-detect
自动检测测试框架并运行相关测试。可识别Jest、Vitest、Playwright、Cypress、pytest、Go test等。可运行全部测试、特定文件测试,或为新代码生成基础测试。用法 - /test-detect、/test-detect src/auth/login.ts、/test-detect generate src/utils.ts
机器翻译查看英文原文
Auto-detect testing framework and run relevant tests. Identifies Jest, Vitest, Playwright, Cypress, pytest, Go test, and others. Can run all tests, specific file tests, or generate basic tests for new code. Usage - /test-detect, /test-detect src/auth/login.ts, /test-detect generate src/utils.ts
适用对象:软件开发与测试。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- Test Detect
- Workflow
- Step 1: Detect the testing framework
- Step 2: Parse arguments
- Step 3: Run full test suite
- Step 4: Run tests for a specific file
- Step 5: Generate tests
- Tips
Automatically detect the testing framework in the current project and run the right tests. Check for these files in order (first match wins): | Check | Framework | Run Command | |-------|-----------|-------------| | vitest.config. exists OR vitest in devDeps | Vitest | npx vitest run | | jest.config. exists OR jest in devDeps | Jest | npx jest | | playwright.config. exists | Playwright | npx playwright test | | cypress.config. exists | Cypress | npx cypress run | | pytest.ini or conftest.py or pyproject.toml with [tool.pytest] | pytest | python -m pytest | | go.mod exists | Go test | go test ./... | | Cargo.toml exists | Rust/cargo | cargo test | | mix.exs exists | ExUnit | mix test | | Gemfile with rspec | RSpec | bundle exec rspec | | package.json has scripts.test | npm test | npm test | Report the detected framework before proceeding. Check $ARGUMENTS for the mode: No arguments or "all": Run the full test suite (Step 3) File path (e.g., src/auth/login.ts): Run tests for that file (Step 4) "generate" + file path (e.g., generate src/utils.ts): Generate tests (Step 5) Run the detected test command. After completion: Report total tests, passed, failed, skipped If tests fail, show th
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- davila7/claude-code-templates
- 源文件
- cli-tool/components/skills/development/test-detect/SKILL.md
- 固定版本
- 21be197f100a12b8d0dd9a211cc244c8179f84d3
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:davila7/claude-code-templates · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T14:01:44.834Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。