jest-image-snapshot
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -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 @@ |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3053063
554