Report error when `all` does not exist in image comparison result
twolfson opened this issue · 2 comments
twolfson commented
We have a regression with image height normalization (or the using the proper paths) but it is being covered over by a silenced error. While imagemagick
is outputting
/tmp/tmp-269851mbuucw.png PNG 987x6867 987x6867+0+0 8-bit DirectClass 632KB 0.160u 0:00.160
/tmp/tmp-26985szzxaxs.png PNG 987x6720 987x6720+0+0 8-bit DirectClass 618KB 0.150u 0:00.150
compare.im6: image widths or heights differ `/tmp/tmp-269851mbuucw.png' @ error/compare.c/CompareImageCommand/962.
to stderr
. We are ignoring it because we do our assertion based off of stderr
.
https://github.com/uber/image-diff/blob/0.4.0/lib/image-diff.js#L52
However, we should be doing a lookup for all
and throw an error containing stderr
if it is not found.
twolfson commented
Another tell tale sign will be that the diffImage
does not exist on disk. However, I am not sure that will always be a required parameter so we should not assert against it.
twolfson commented
Resolved in 0.5.0