Writes unit tests with high coverage using Jest, pytest, JUnit, or RSpec. Guides test structure, mocking, async testing, and edge cases.
Ships in aj-geddes-useful-ai-prompts-4. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Write effective unit tests that are fast, isolated, readable, and maintainable following industry best practices and AAA (Arrange-Act-Assert) pattern.
Minimal working example:
// Jest/JavaScript example
describe("UserService", () => {
describe("createUser", () => {
it("should create user with valid data", async () => {
// Arrange - Set up test data and dependencies
const userData = {
email: "[email protected]",
firstName: "John",
lastName: "Doe",
};
const mockDatabase = createMockDatabase();
const service = new UserService(mockDatabase);
// Act - Execute the function being tested
const result = await service.createUser(userData);
// Assert - Verify the outcome
expect(result.id).toBeDefined();
expect(result.email).toBe("[email protected]");
expect(mockDatabase.save).toHaveBeenCalledWith(
expect.objectContaining(userData),
);
});
});
});
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Test Structure (AAA Pattern) | Test Structure (AAA Pattern) |
| Test Cases by Language | Test Cases by Language |
| Mocking & Test Doubles | Mocking & Test Doubles |
| Testing Async Code | Testing Async Code, Test Coverage |
| Testing Edge Cases | Testing Edge Cases |
| Example: Complete Test Suite | import { UserService } from "./user-service"; |
references/example-complete-test-suite.md (opens in a new tab)references/mocking-test-doubles.md (opens in a new tab)references/test-cases-by-language.md (opens in a new tab)references/test-structure-aaa-pattern.md (opens in a new tab)references/testing-async-code.md (opens in a new tab)references/testing-edge-cases.md (opens in a new tab)scripts/scaffold-tests.sh (opens in a new tab)templates/test-template.js (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/aj-geddes-useful-ai-prompts-4:unit-testing-frameworkfrom aj-geddes-useful-ai-prompts-4
aj-geddes-useful-ai-prompts-4@cascade-code-languages-misc-1 is listed by joshuarweaver/cascade-code-languages-misc-1 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4259 skills in this plugin
/ab-test-analysisA/B Test AnalysisDesign and analyze A/B tests, calculate statistical significance, and determine sample sizes for conversion optimization and experiment validation/access-control-rbacImplement Role-Based Access Control (RBAC), permissions management, and authorization policies. Use when building secure access control systems with fine-grained permissions.
/accessibility-complianceImplement WCAG 2.1/2.2 accessibility standards, screen reader compatibility, keyboard navigation, and a11y testing. Use when building inclusive web applications, ensuring regulatory compliance, or improving user experience for people with disabilities.
Other plugins' skills for the same job