In simple English
This tool helps you catch visual bugs in your web pages. It takes a screenshot of your app during a test. It compares that picture against a saved baseline image. If the pictures do not match, the test fails and shows you the difference. You can run tests inside your existing test runner without learning a new system.
What it is
A JavaScript library that adds image comparison functions to the Jest (a popular JavaScript testing framework) test runner. It uses pixel comparison algorithms to detect unwanted visual changes.
What it is good for
Web developers who want to stop visual regressions before their code reaches production.
- Integrates directly into your existing Jest test suite.
- Saves clear side-by-side comparison images when tests fail.
- Supports adjustable thresholds so minor pixel noise does not fail tests.
- Requires an existing Jest test setup to function.
- Tests can produce false failures across different operating systems due to font rendering.
- Baseline images can take up significant storage space in your repository.
Manual visual inspection of web pages in a browser.
Jest
- garris/BackstopJS7.2k stars
A standalone visual regression testing tool that compares DOM screenshots across screen sizes.
- HypothesisWorks/hypothesis9.1k stars
A Python library that generates test inputs and reduces any failure to the smallest example that still fails.
- wntrblm/nox1.6k stars
Runs your tests and other jobs in fresh isolated environments, described in an ordinary Python file.
npm i --save-dev jest-image-snapshot