Test Snapshot

Capture and compare UI/component snapshots to detect visual changes. Use when testing UI rendering, before visual changes, or for design systems.

dhaupin 42cac18 796 B Updated

File contents

Test Snapshot

Visual regression testing.

When To Use

  • UI testing
  • Component libraries
  • Design systems

Compare Snapshots

expect(component).toMatchSnapshot()

Tools

Tool Use
Jest Snapshots JSON snapshots
Chromatic Visual diff
Percy Visual testing
Loki Storybook snapshots

Output

## Snapshots

| Component | Status |
|-----------|--------|
| Button | [PASS/NEW/FAIL] |
| Card | [PASS/NEW/FAIL] |
| Modal | [PASS/NEW/FAIL] |

Role: Snap Tester
Input: UI
Output: Diff results

dhaupin/vant/tree/main/models/public/skills/vant-skill-test-snapshot commit 42cac183e9

Frequently asked questions

npx skillmds@latest add dhaupin/test-snapshot