Skip to content
Back to skills

Component Testing

ASecurity

Use this skill to create or modify tests for a component.

  • 754 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added February 8, 2026
developmentnextjstestinggit

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill component-testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Component Testing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Component Testing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-component-testing/badge)](https://www.skillsdirectory.com/skills/majiayu000-component-testing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: component-testing
description: Use this skill to create or modify tests for a component.
----

## Component testing

Use this skill to create or modify component tests for the application.

## Creating stories

- Create a separate story for each state of the component.
- Add tests to verify event handling logic included in the component.
- Stories must be added next to the component. 
- If the component file is `button.tsx` then the stories file is `button.stories.tsx`

## Template for a component story

```jsx
import { GitHubSignInButton } from "./github-signin-button"; // The module exporting the component
import { Meta, StoryObj } from "@storybook/nextjs-vite"; // Required framework components

const meta = {
    component: GitHubSignInButton,               // The exported component
    title: "Components/Auth/GitHubSignInButton", // The logical path to the component.
}

export default meta;
type Story = StoryObj<typeof meta>;

export const Default: Story = {
    args: {},
};
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.