Socket
Socket
Sign inDemoInstall

jest-image-snapshot

Package Overview
Dependencies
Maintainers
5
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-image-snapshot - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [4.0.1](https://github.com/americanexpress/jest-image-snapshot/compare/v4.0.0...v4.0.1) (2020-05-27)
### Bug Fixes
* **options:** add allowSizeMismatch arg ([6529ff4](https://github.com/americanexpress/jest-image-snapshot/commit/6529ff4b2bd9a20abe33d4b68d9d793198931f18))
# [4.0.0](https://github.com/americanexpress/jest-image-snapshot/compare/v3.1.0...v4.0.0) (2020-05-14)

@@ -2,0 +9,0 @@

2

package.json
{
"name": "jest-image-snapshot",
"version": "4.0.0",
"version": "4.0.1",
"description": "Jest matcher for image comparisons. Most commonly used for visual regression testing.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -40,2 +40,3 @@ /*

dumpDiffToConsole,
allowSizeMismatch,
}) {

@@ -69,3 +70,3 @@ let pass = true;

let failure;
if (result.diffSize) {
if (result.diffSize && !allowSizeMismatch) {
failure = `Expected image to be the same size as the snapshot (${result.imageDimensions.baselineWidth}x${result.imageDimensions.baselineHeight}), but was different (${result.imageDimensions.receivedWidth}x${result.imageDimensions.receivedHeight}).\n`;

@@ -139,2 +140,3 @@ } else {

dumpDiffToConsole: commonDumpDiffToConsole = false,
allowSizeMismatch: commonAllowSizeMismatch = false,
} = {}) {

@@ -154,2 +156,3 @@ return function toMatchImageSnapshot(received, {

dumpDiffToConsole = commonDumpDiffToConsole,
allowSizeMismatch = commonAllowSizeMismatch,
} = {}) {

@@ -203,2 +206,3 @@ const {

blur,
allowSizeMismatch,
});

@@ -213,2 +217,3 @@

dumpDiffToConsole,
allowSizeMismatch,
});

@@ -215,0 +220,0 @@ };

Sorry, the diff of this file is not supported yet

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