AgentSkillsCN

renderer-process-unit-tests

使用 Vitest + Testing Library 编写健壮的渲染器单元测试,涵盖 window.electron 模拟对象,并全面覆盖正向与负向场景测试。

SKILL.md
--- frontmatter
name: renderer-process-unit-tests
description: Write robust renderer unit tests with Vitest + Testing Library, including window.electron mocks and positive/negative scenarios.
argument-hint: "[test target] [component/hook] [mocked IPC cases]"
user-invokable: true
disable-model-invocation: false

Skill Instructions

Use this skill when the request matches Renderer Process Unit Tests or references patterns from docs/renderer-process-unit-tests.md.

Workflow

  1. Read SOURCE.md for the full repository guidance.
  2. Identify concrete constraints, conventions, and required outputs.
  3. Apply the guidance directly to the current task, keeping changes minimal and repository-consistent.
  4. Validate results (tests/lint/build where relevant).
  5. Summarize what was applied from this skill and where.

Input Guidance

When invoking this skill manually, include:

  • Task goal
  • Target files or modules
  • Any constraints (performance, architecture, style, tests)

Source

This skill is generated from docs/renderer-process-unit-tests.md. Use SOURCE.md as the canonical local resource loaded on demand.