Files
jiu/.claude/commands/test.md
T
wangjia e550b73d6d chore(commands): build/test/release 流程统一用 claude-sonnet-4-6 模型,新增 /build /test 命令
- release.md 补 frontmatter(model: claude-sonnet-4-6)
- 新增 /build:go build/vet + flutter analyze 编译静态检查
- 新增 /test:go test + flutter test
- 三者均通过 frontmatter 指定 sonnet 4.6

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 15:05:56 +08:00

1.0 KiB
Raw Blame History

description, argument-hint, model, allowed-tools
description argument-hint model allowed-tools
运行本地测试(后端 go test + 前端 flutter test 可选 backend | client,留空则全部 claude-sonnet-4-6 Bash

运行本地自动化测试。任意用例失败立即停止并报告(贴出失败用例与关键输出)。

参数 $ARGUMENTS

  • 留空:后端 + 前端
  • backend:仅后端
  • client:仅前端

后端测试(参数为空或 backend 时执行)

export PATH="/opt/homebrew/bin:$PATH"
cd backend && go test ./...

不得有 FAIL。[no test files] 属正常(该包无测试)。

前端测试(参数为空或 client 时执行)

export PATH="/opt/homebrew/bin:$PATH"
cd client && flutter test

All tests passed!

完成报告

全部通过后用一行 result: 汇总(如 result: 后端 go test 全过、前端 121 测试全过)。 任一失败则停止,列出失败用例名与原因,不要自行修改业务代码(如需修复,告知用户或交给对应 coder)。