jest-image-snapshot vs Loki
jest-image-snapshot
github.comLoki
loki.js.orgSide by side
| Figure | jest-image-snapshot | Loki |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Web | — | Yes |
| Windows | — | Yes |
| macOS | — | Yes |
| Linux | — | Yes |
| iOS | — | Yes |
| Android | — | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Visual Regression Testing Software | 7.6 (#18) | 8.6 (#4) |
| License | The project states that contributions are governed by the Apache License 2.0. | The project repository identifies Loki as MIT licensed. |
| Purpose | A Jest matcher for comparing images, commonly used for visual regression testing. | Loki tests Storybook projects for visual regressions by comparing screenshots with reference images. |
Plans
In their own words
jest-image-snapshot
jest-image-snapshot has no write-up on Specifiction yet; its figures are above.
Loki
Loki is a free, MIT-licensed tool for checking Storybook projects for visual regressions. It captures story screenshots and compares them with reference images, producing visual differences for review. The workflow is to create reference screenshots, run comparisons, review the differences, and approve updated references. Loki is designed for continuous integration, where tests can fail if reference images are missing. Capture targets include Chrome in Docker or locally, Chrome in AWS Lambda, the iOS simulator, and the Android emulator; an AWS Lambda renderer is available for large test suites. Node 16 or later is required. Recent Storybook versions need no extra integration for non-React Native projects, while React Native setup uses an import in `storybook/storybook.js`. Projects can configure Loki in a `package.json` section or supported Loki configuration files. Loki does not start Storybook or simulator and emulator servers, so they need to be running before tests. Documented animation limitations include looping requestAnimationFrame animations, GIFs, SVG animations, native Lottie animations, and React Native Animated.