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 Updated 16 repo stars

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 commit 42cac183e9

Frequently asked questions

npx get-skill add dhaupin/test-snapshot