0.1.2 • Published 3 years ago
jest-dify-snapshot v0.1.2
jest-dify-snapshot
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();
});