Closed
Description
Describe the bug
maxDiffThreshold
is a number that represents the maximum fractional value of pixels changed, where 1 means all pixels are different and 0 means all pixels are the same.
However, when setting it to 0, it fallbacks to 0.01.
To Reproduce
Set maxDiffThreshold to 0, create a test that matches the snapshots and run it, then change a single character and see that the test still passes.
Expected behavior
The above test should fail.
Additional context
It appears to be because the default value is set using ||
and not using ??
which makes 0 a falsy value and thus fallbacks to 0.01.