OpenParable
Skip to content
← Back to skills

Write Jest Tests

Testing & Quality
write-jest-tests

Write Jest Tests is an Agent Skill for testing & quality published in the rundeck/rundeck repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Write Vue component unit tests. Use when the user asks to write unit tests, write Jest tests, write Vue tests, add tests to a component, or test a Vue component.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/rundeck/rundeck/blob/HEAD/.claude/skills/write-jest-tests/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/write-jest-tests, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Write Jest Tests

Reference: .claude/docs/jest-testing-guidelines.md — 21 rules with rationale and examples


Phase 1: Read Guidelines

Read .claude/docs/jest-testing-guidelines.md completely before writing any code.


Phase 2: Write Tests

  1. Read the component under test fully
  2. Check the closest jest.global-mocks.js before adding any mock
  3. Create test file at [component-dir]/tests/[ComponentName].spec.ts
  4. Write tests following all rules in the guidelines
  5. Run npm run test:unit [file] — fix until all pass

Phase 3: Verify Compliance

Open VERIFICATION-CHECKLIST.md (in this skill's folder) and execute Gates 1–4 sequentially.

  • Gate 1 (Priority 1 — 7 steps): fix all violations, restart Gate 1 if any fail
  • Gate 2 (Priority 2 — 9 steps): fix all violations, restart Gate 2 if any fail
  • Gate 3 (Priority 3 — 5 steps): document warnings + fix plans; does not block
  • Gate 4 (Final — 3 steps): tests pass, edge cases covered, conditional rendering tested

For every enumeration step: list ALL instances with line numbers — no sampling.


Phase 4: Certify

COMPLIANCE CERTIFICATION
Test File: _________________
Component: _________________
Gate 1 (Priority 1): [PASSED]
Gate 2 (Priority 2): [PASSED]
Gate 3 (Priority 3): [PASSED / WARNINGS: ...]
Gate 4 (Final):      [PASSED]
RESULT: COMPLIANT

Done: [test file created, N tests, all gates passed] Artifacts: [path to test file] Next: [deferred P3 fixes, or "none"]


Maintenance

This file orchestrates — it does not define rules or verification steps. If referenced file names change, update Phase 1 and Phase 3 references only.