Agent Skillspierrecomputer/pierre › testing-and-verification

testing-and-verification

GitHub

提供代码变更后的测试与验证流程,涵盖格式化、Lint、类型检查及基于Bun的单元测试。指导何时使用Playwright进行E2E测试及快照管理,确保代码质量与正确性。

.agents/skills/testing-and-verification/SKILL.md pierrecomputer/pierre

Trigger Scenarios

添加或运行测试 检查或更新快照 选择测试工具(Bun或Playwright) 执行代码格式化和Lint检查 决定变更的验证范围

Install

npx skills add pierrecomputer/pierre --skill testing-and-verification -g -y
More Options

Non-standard path

npx skills add https://github.com/pierrecomputer/pierre/tree/main/.agents/skills/testing-and-verification -g -y

Use without installing

npx skills use pierrecomputer/pierre@testing-and-verification

指定 Agent (Claude Code)

npx skills add pierrecomputer/pierre --skill testing-and-verification -a claude-code -g -y

安装 repo 全部 skill

npx skills add pierrecomputer/pierre --all -g -y

预览 repo 内 skill

npx skills add pierrecomputer/pierre --list

SKILL.md

Frontmatter
{
    "name": "testing-and-verification",
    "description": "Use when adding or running tests, checking snapshots, choosing between Bun tests and Playwright, running lint\/format\/typecheck, or deciding the verification scope for a change."
}

Testing and Verification

Baseline Commands

After code changes, run the required baseline (moon tasks run from anywhere in the repo, including CI-marked agent shells):

moon run root:format root:lint

Useful check/fix pairs on the root project:

moon run root:format-check
moon run root:format
moon run root:lint
moon run root:lint-fix
moon run root:lint-css
moon run root:lint-css-fix

For code changes, also run the relevant typecheck (moon builds workspace dependencies first automatically):

moonx <project>:typecheck
# or, scoped to what actually changed:
moonx :typecheck --affected

Unit and Integration Tests

Use Bun's built-in test runner. Tests usually live in a test/ folder inside each package and use describe, test, and expect from bun:test.

Prefer unit or integration tests by default:

moonx diffs:test
moonx trees:test

moon run :test runs every project's suite. Tests import workspace dependencies through their built dist, so moon builds those first; running bun test directly inside a package also works when dist is fresh.

Snapshots

Bun supports toMatchSnapshot(). Avoid new snapshot coverage unless it is shallow and narrowly scoped to the exact behavior under test.

Update snapshots from the package directory:

bun test -u

Browser and E2E Tests

Add Playwright/browser E2E tests only when behavior cannot be validated without a real browser engine. Good candidates include computed style checks, shadow DOM boundaries, and browser-only rendering behavior.

Keep E2E coverage small and high-value:

moonx trees:coverage
moonx trees:test-e2e
moonx path-store:test-demo
moonx docs:test-e2e

If E2E fixtures or dev servers are started in a worktree, follow the cleanup contract from the worktrees-and-dev-servers skill.

Version History

  • 3b70f81 Current 2026-07-24 22:03

Same Skill Collection

.agents/skills/browser-automation/SKILL.md
.agents/skills/git-commits/SKILL.md
.agents/skills/performance/SKILL.md
.agents/skills/tooling-and-dependencies/SKILL.md
.agents/skills/typescript-monorepo/SKILL.md
.agents/skills/worktrees-and-dev-servers/SKILL.md
skills/diffs/SKILL.md
skills/theme/SKILL.md
skills/theming/SKILL.md
skills/trees/SKILL.md

Metadata

Files
0
Version
ba7d51d
Hash
1f3f103b
Indexed
2026-07-24 22:03

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 12:00
浙ICP备14020137号-1 $Гость$