jest-image-snapshot
Advanced tools
Comparing version 6.3.0 to 6.4.0
@@ -0,1 +1,8 @@ | ||
# [6.4.0](https://github.com/americanexpress/jest-image-snapshot/compare/v6.3.0...v6.4.0) (2023-12-11) | ||
### Features | ||
* add configurable maxBuffer option to runDiffImageToSnapshot ([#344](https://github.com/americanexpress/jest-image-snapshot/issues/344)) ([befad8b](https://github.com/americanexpress/jest-image-snapshot/commit/befad8ba6080be6b0a94d098334ea05258afab2e)) | ||
# [6.3.0](https://github.com/americanexpress/jest-image-snapshot/compare/v6.2.0...v6.3.0) (2023-11-28) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "jest-image-snapshot", | ||
"version": "6.3.0", | ||
"version": "6.4.0", | ||
"description": "Jest matcher for image comparisons. Most commonly used for visual regression testing.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -127,2 +127,3 @@ <h1 align="center"> | ||
* `allowSizeMismatch`: (default `false`) If set to true, the build will not fail when the screenshots to compare have different sizes. | ||
* `maxChildProcessBufferSizeInBytes`: (default `10 * 1024 * 1024`) Sets the max number of bytes for stdout/stderr when running `diff-snapshot` in a child process. | ||
* `runtimeHooksPath`: (default `undefined`) This needs to be set to a existing file, like `require.resolve('./runtimeHooksPath.cjs')`. This file can expose a few hooks: | ||
@@ -129,0 +130,0 @@ * `onBeforeWriteToDisc`: before saving any image to the disc, this function will be called (can be used to write EXIF data to images for instance) |
@@ -424,3 +424,3 @@ /* | ||
stdio: ['pipe', 'inherit', 'inherit', 'pipe'], | ||
maxBuffer: 10 * 1024 * 1024, // 10 MB | ||
maxBuffer: options.maxChildProcessBufferSizeInBytes, | ||
} | ||
@@ -427,0 +427,0 @@ ); |
@@ -154,2 +154,6 @@ /* | ||
allowSizeMismatch: commonAllowSizeMismatch = false, | ||
// Default to 10 MB instead of node's default 1 MB | ||
// See https://nodejs.org/api/child_process.html#child_processspawnsynccommand-args-options | ||
maxChildProcessBufferSizeInBytes: | ||
commonMaxChildProcessBufferSizeInBytes = 10 * 1024 * 1024, // 10 MB | ||
comparisonMethod: commonComparisonMethod = 'pixelmatch', | ||
@@ -177,2 +181,3 @@ } = {}) { | ||
allowSizeMismatch = commonAllowSizeMismatch, | ||
maxChildProcessBufferSizeInBytes = commonMaxChildProcessBufferSizeInBytes, | ||
comparisonMethod = commonComparisonMethod, | ||
@@ -242,2 +247,3 @@ } = {}) { | ||
allowSizeMismatch, | ||
maxChildProcessBufferSizeInBytes, | ||
comparisonMethod, | ||
@@ -244,0 +250,0 @@ runtimeHooksPath, |
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
84887
821
309