americanexpress / jest-image-snapshot

✨ Jest matcher for image comparisons. Most commonly used for visual regression testing.
Apache License 2.0
3.84k stars 200 forks source link

feat: add configurable maxBuffer option to runDiffImageToSnapshot #344

Closed haze closed 11 months ago

haze commented 11 months ago

Description

Adds a new option maxChildProcessBufferSizeInBytes. This lets us override the maximum allowed byte count for stderr/stdout for diff-screenshot child processes.

Motivation and Context

One of my projects routinely diffs large (>4k) images. The default 10 MB limit is too small for my use case.

How Has This Been Tested?

Privately tested in a fork before upstreaming changes; Configuration change means we no longer run into the default limit. Updated tests.

Types of Changes

Checklist:

What is the Impact to Developers Using Jest-Image-Snapshot?

There should be no discernible impact beyond additional configurability.

dogpatch626 commented 11 months ago

Will need updates to readme

oneamexbot commented 11 months ago

:tada: This PR is included in version 6.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: