jest-testing-workflow

📁 kentoshimizu/sw-agent-skills 📅 1 day ago
0
总安装量
1
周安装量
安装命令
npx skills add https://github.com/kentoshimizu/sw-agent-skills --skill jest-testing-workflow

Agent 安装分布

amp 1
cline 1
opencode 1
cursor 1
continue 1
kimi-cli 1

Skill 文档

Jest Testing Workflow

Overview

Use this skill to design and run Jest suites that are stable, meaningful, and decision-ready for merge gates.

Scope Boundaries

  • Use this skill when the task matches the trigger condition described in description.
  • Do not use this skill when the primary task falls outside this skill’s domain.

Shared References

  • Trigger examples and expected deliverables:
    • references/trigger-and-examples.md
  • Mock boundary decision rules:
    • references/mock-boundary-decision-rules.md
  • Determinism rules:
    • references/jest-determinism-rules.md

Templates And Assets

  • Test plan template:
    • assets/jest-test-plan-template.md
  • Command profile template:
    • assets/jest-command-profile-template.md
  • Flake triage checklist:
    • assets/jest-flake-triage-checklist.md

Inputs To Gather

  • Change scope and affected JS/TS modules.
  • Runtime assumptions (node/jsdom) and mock boundaries.
  • CI constraints for runtime and coverage gates.
  • Known flaky areas (async timers, shared state, external dependencies).

Deliverables

  • Jest test strategy with mock/timer/environment policy.
  • Assertion matrix for happy, edge, and failure paths.
  • Local-fast and CI-full command profiles.
  • Residual flakiness risk log with owner and next action.

Workflow

  1. Clarify decision question and mandatory quality constraints.
  2. Draft strategy using assets/jest-test-plan-template.md.
  3. Decide mock boundaries with references/mock-boundary-decision-rules.md.
  4. Define execution profiles in assets/jest-command-profile-template.md.
  5. Stabilize async/timer behavior with references/jest-determinism-rules.md.
  6. Run checks and close with assets/jest-flake-triage-checklist.md.

Quality Standard

  • Trigger fit and test depth are explicit.
  • Mock strategy preserves behavior confidence for critical paths.
  • Async/timer behavior is deterministic in local and CI runs.
  • Evidence is reproducible with exact commands and artifacts.

Failure Conditions

  • Stop when mock strategy hides behavior that must be integration-visible.
  • Stop when command profile is not reproducible across local/CI.
  • Escalate when flakiness persists after deterministic controls.