jest-image-snapshot icon indicating copy to clipboard operation
jest-image-snapshot copied to clipboard

require failureThreshold at both percentage and pixel level ?

Open taozhou-glean opened this issue 11 months ago • 1 comments

we have some large screenshots, the percentage itself (0.001) there can still be large enough to not capture certain changes we want, so would be nice to have a 0.001 with percent and min-pixel like 300 at the same time

taozhou-glean avatar Mar 14 '24 22:03 taozhou-glean

here is the proposed interface:

// number for backward compatible
failureThreshold: number | {
  pixel: number,
  percent: number,
}
// or leave `both` out to infer based on above object type
failureThresholdType: "pixel" | "percent" | "both"

taozhou-glean avatar Mar 14 '24 22:03 taozhou-glean