jest-image 🌇 vs 🌆
Custom jest matchers to test the visual regression
Installation
This module is distributed via [npm][npm] which is bundled with [node][node] and
should be installed as one of your project's devDependencies
:
npm install --save-dev jest-image
or
yarn add --D jest-image
Usage
Import jest-image/extend-expect
once (for instance in your tests setup file)
and you're good to go:
Alternatively, you can selectively import only the matchers you intend to use,
and extend jest's expect
yourself:
expect
toMatchImageBuffer
toMatchImageBufferbuffer: Buffer
Fastest way to compare images. It takes less than 1ms to get a result.