1.0.1 • Published 2 years ago

@pkerschbaum/cypress-image-snapshot v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@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-snapshot necessary anymore).
  • Snapshots are now stored next to the Cypress spec file in the folder __cy_image_snapshots__.
    That's why the options customSnapshotsDir and customDiffDir were removed.

Installation

Using npm:

npm install --save-dev @pkerschbaum/cypress-image-snapshot jest-image-snapshot

Using yarn:

yarn add --dev @pkerschbaum/cypress-image-snapshot jest-image-snapshot

then 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();

Syntax, Usage, ...

See jaredpalmer/cypress-image-snapshot.