Socket
Socket
Sign inDemoInstall

cypress-image-snapshot

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-image-snapshot

Cypress bindings for jest-image-snapshot.


Version published
Weekly downloads
110K
increased by2.51%
Maintainers
3
Weekly downloads
 
Created

What is cypress-image-snapshot?

The cypress-image-snapshot package is a plugin for Cypress that allows you to take and compare screenshots for visual regression testing. It helps ensure that your web application's UI does not change unexpectedly.

What are cypress-image-snapshot's main functionalities?

Snapshot Testing

This feature allows you to take a snapshot of the current state of a web page and compare it to a baseline image. If the images do not match, the test will fail.

cy.visit('http://example.com');
cy.matchImageSnapshot();

Custom Snapshot Names

You can specify a custom name for your snapshot, which is useful for organizing and identifying different snapshots.

cy.visit('http://example.com');
cy.matchImageSnapshot('customSnapshotName');

Snapshot Options

This feature allows you to customize the snapshot comparison with various options such as failure thresholds, custom diff configurations, and capture modes.

cy.visit('http://example.com');
cy.matchImageSnapshot({
  failureThreshold: 0.03,
  failureThresholdType: 'percent',
  customDiffConfig: { threshold: 0.1 },
  capture: 'viewport'
});

Other packages similar to cypress-image-snapshot

FAQs

Package last updated on 22 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc