You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: