joshuaculmer/cook_book/unit

Claude Code and agent skill by joshuaculmer/cook_book

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Load when writing unit or integration tests for React components or hooks. Uses Vitest and React Testing Library.

Install

npx vskill@latest install joshuaculmer/cook_book/unit

SKILL.md

The same SKILL.md was published earlier as joshuaculmer/cook_book/unit.

This project uses Vitest and React Testing Library (RTL) for unit and integration tests.

File conventions:

  • Test files are named ComponentName.test.tsx or hookName.test.ts.
  • Co-locate test files next to the code they test in the same directory.
  • Use describe blocks to group related tests; use it or test for individual cases.

React Testing Library patterns:

tsx
import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { MyComponent } from "./MyComponent";
it("shows the submit button when form is valid", async () => {
const user = userEvent.setup();
render(<MyComponent />);
await user.type(screen.getByLabelText("Email"), "test@example.com");
expect(screen.getByRole("button", { name: /submit/i })).toBeEnabled();
});

Querying priority (use in this order):

  1. getByRole — most accessible and closest to how a user finds elements
  2. getByLabelText — for form fields
  3. getByText — for visible text
  4. getByTestId — last resort only; add data-testid sparingly

Assertions:

  • Use @testing-library/jest-dom matchers: toBeInTheDocument, toBeEnabled, toHaveValue, etc.
  • Prefer findBy* (async) over waitFor + getBy* when waiting for async elements.

Do not:

  • Do not use act() manually unless RTL cannot handle it — RTL wraps most interactions already.
  • Do not test implementation details (internal state, private methods, exact class names).
  • Do not snapshot test unless the output is highly stable and the snapshot is reviewed.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Refreshed 13 Oct 2026, a month ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/joshuaculmer/cook_book/unit/badge)](https://verified-skill.com/skills/joshuaculmer/cook_book/unit)

Something wrong with this skill or its page? Tell us.