jest-dify-snapshot

[![npm version](https://img.shields.io/npm/v/jest-dify-snapshot.svg)](https://www.npmjs.com/package/jest-dify-snapshot) [![npm downloads](https://img.shields.io/npm/dm/jest-dify-snapshot.svg)](https://www.npmjs.com/package/jest-dify-snapshot)

Usage no npm install needed!

<script type="module">
  import jestDifySnapshot from 'https://cdn.skypack.dev/jest-dify-snapshot';
</script>

README

jest-dify-snapshot

npm version npm downloads

Usage

1. Install

npm i --save-dev jest-dify-snapshot
# or if you are using yarn
yarn --save-dev jest-dify-snapshot

2. Extend Jest expect

const { toMatchImageSnapshot } = require('jest-dify-snapshot');
expect.extend({ toMatchImageSnapshot });

3. Use expect(...).toMatchImageSnapshot()

it('should match image snapshot', () => {
  // ...
  expect(img).toMatchImageSnapshot();
});