test

GitHub

用于运行 Terrae 组件测试,支持全量、监听及指定组件模式。能报告测试结果并分析失败原因,协助用户修复代码或测试。

.claude/skills/test/SKILL.md alamenai/terrae

Trigger Scenarios

需要运行项目测试时 测试失败需要分析原因时 检查特定组件功能是否正常时

Install

npx skills add alamenai/terrae --skill test -g -y
More Options

Non-standard path

npx skills add https://github.com/alamenai/terrae/tree/main/.claude/skills/test -g -y

Use without installing

npx skills use alamenai/terrae@test

指定 Agent (Claude Code)

npx skills add alamenai/terrae --skill test -a claude-code -g -y

安装 repo 全部 skill

npx skills add alamenai/terrae --all -g -y

预览 repo 内 skill

npx skills add alamenai/terrae --list

SKILL.md

Frontmatter
{
    "name": "test",
    "description": "Run tests for Terrae components",
    "allowed-tools": "Bash(npm run test*), Bash(npx vitest *)",
    "argument-hint": [
        "component-name"
    ]
}

Test Skill

Run tests for Terrae components.

Instructions

  1. Run All Tests

    npm run test:run
    

    This runs vitest in single-run mode.

  2. Run Tests in Watch Mode If the user wants to develop with live feedback:

    npm run test
    

    Note: This runs in watch mode and won't exit automatically.

  3. Run Specific Tests To run tests for a specific component:

    npx vitest run {component-name}
    

    Example: npx vitest run marker

  4. Report Results

    • Show passing/failing test counts
    • For failures, show:
      • Test name
      • Expected vs received values
      • File and line number
  5. Handle Failures If tests fail:

    • Analyze the failure reason
    • Ask if the user wants help fixing the test or the code
    • Show the relevant test file and component code
  6. Test File Location Tests are typically located at:

    • src/registry/map/__tests__/{component}.test.tsx
    • Or alongside components: {component}.test.tsx

Version History

  • ea9a480 Current 2026-07-25 11:49

Same Skill Collection

.claude/skills/check/SKILL.md
.claude/skills/commit/SKILL.md
.claude/skills/docs/SKILL.md
.claude/skills/fix/SKILL.md
.claude/skills/issue/SKILL.md
.claude/skills/lint/SKILL.md
.claude/skills/new/SKILL.md
.claude/skills/perf/SKILL.md
.claude/skills/release/SKILL.md
.claude/skills/review/SKILL.md
.claude/skills/pr/SKILL.md

Metadata

Files
0
Version
ea9a480
Hash
a8cc38b6
Indexed
2026-07-25 11:49

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-27 17:34
浙ICP备14020137号-1 $Carte des visiteurs$