Cypress < v10
Cypress plugin
Import and initialise the Cypress image diff plugin:
// cypress/plugin/index.js
module.exports = (on, config) => {
const getCompareSnapshotsPlugin = require('cypress-image-diff-js/plugin')
return getCompareSnapshotsPlugin(on, config)
};
Cypress support
Import and add Cypress image command:
// cypress/support/index.js
require('./commands');
// cypress/support/commands.js
compareSnapshotCommand();
Last updated