1.0.1 • Published 4 years ago
@pkerschbaum/cypress-image-snapshot v1.0.1
@pkerschbaum/cypress-image-snapshot
This is a fork of jaredpalmer/cypress-image-snapshot with following changes applied:
- The project was re-written with TypeScript (no
@types/cypress-image-snapshotnecessary anymore). - Snapshots are now stored next to the Cypress spec file in the folder
__cy_image_snapshots__.
That's why the optionscustomSnapshotsDirandcustomDiffDirwere removed.
Installation
Using npm:
npm install --save-dev @pkerschbaum/cypress-image-snapshot jest-image-snapshotUsing yarn:
yarn add --dev @pkerschbaum/cypress-image-snapshot jest-image-snapshotthen add the following in your project's <rootDir>/cypress/plugins/index.js:
import { addMatchImageSnapshotPlugin } from '@pkerschbaum/cypress-image-snapshot/lib/plugin';
module.exports = (on, config) => {
addMatchImageSnapshotPlugin(on, config);
};and in <rootDir>/cypress/support/commands.js add:
import { addMatchImageSnapshotCommand } from '@pkerschbaum/cypress-image-snapshot/lib/command';
addMatchImageSnapshotCommand();