snapshot-test
Generate Jest snapshot tests for components
Source facts
- Repository
- lxgicstudios/ai-snapshot-test
- Last source activity
- August 20, 2026 at 19:08
- Detected SKILL.md language
- English
- Stars
- 0
- Forks
- 0
Install options
The review-first prompt is selected by default. You can switch to a direct command or download a local copy.
Review the source files
Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.
Showing SKILL.md
SKILL.md
Source instructions · Read-only preview- 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.
View on GitHub