Skip to content
Back to skills

Ai Snapshot Test

ASecurity

Generate Jest snapshot tests for components

  • 21 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 7, 2026
developmenttypescriptbashnodegitapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill ai-snapshot-test --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ai Snapshot Test?

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

Security grade badge for Ai Snapshot Test
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-ai-snapshot-test/badge)](https://www.skillsdirectory.com/skills/modbender-ai-snapshot-test)

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: snapshot-test
description: Generate Jest snapshot tests for components
---

# Snapshot Test Generator

Point it at your components, get snapshot tests. Covers common states and props.

## Quick Start

```bash
npx ai-snapshot-test ./src/components/Button.tsx
```

## What It Does

- Generates Jest snapshot tests
- Covers default and edge cases
- Tests different prop combinations
- Handles async components

## Usage Examples

```bash
# Generate for a component
npx ai-snapshot-test ./src/components/Card.tsx

# Generate for directory
npx ai-snapshot-test ./src/components/

# With specific test runner
npx ai-snapshot-test ./components --runner vitest
```

## Output Example

```typescript
describe('Button', () => {
  it('renders default state', () => {
    const { container } = render(<Button>Click me</Button>);
    expect(container).toMatchSnapshot();
  });

  it('renders disabled state', () => {
    const { container } = render(<Button disabled>Click me</Button>);
    expect(container).toMatchSnapshot();
  });
});
```

## Test Cases Generated

- Default props
- Required prop variations
- Edge cases (empty, null)
- Loading/error states
- Different sizes/variants

## Requirements

Node.js 18+. OPENAI_API_KEY required.

## License

MIT. Free forever.

---

**Built by LXGIC Studios**

- GitHub: [github.com/lxgicstudios/ai-snapshot-test](https://github.com/lxgicstudios/ai-snapshot-test)
- Twitter: [@lxgicstudios](https://x.com/lxgicstudios)

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.