-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable fail on image size mismatch to be configurable #85
Comments
@mishimaltd do the solutions in #83 (comment) help at all? I'd be reluctant to add this feature because an image of different dimensions is a different image and should fail. Doing a diff across differently sized images yields to unexpected and misleading results. |
Hey, thanks very much for coming back to me. I do take your point on image size, it is a bit of a stretch. I'll try using Jimp to clean up the image prior to comparing, I think it will do what I need. Thanks again :-) |
Just in case anyone will stumble across this Issue in the future: I can recommend sharp instead of JIMP because of performance reasons in favor of a bit less compatibility. Our Performance Results: |
) if the option `allowSizeMismatch` is set, a build will not always fail on images with different sizes. Missing or Added Pixel will be counted as a mismatch and respected by the set threshold. Related americanexpress#83, americanexpress#85
# [3.1.0](americanexpress/jest-image-snapshot@v3.0.1...v3.1.0) (2020-04-17) ### Features * **options:** add option to pass on size missmatch ([americanexpress#174](americanexpress#174)) ([cee46b1](americanexpress@cee46b1)), closes [americanexpress#83](americanexpress#83) [americanexpress#85](americanexpress#85)
I am snapshot testing a legacy project and the diff tool works wonderfully most of the time. The system I am testing will sometimes return HTML that is one pixel taller than the previously captured snapshot. Other than the height difference, the output is identical and the pixel match works fine.
Would it be possible to make the default fail on image size mismatch logic configurable? This would really help me with regression testing so that I can focus on significant differences and ignore these edge cases.
The text was updated successfully, but these errors were encountered: