diff --git a/screenshot-testing-plugin/src/main/kotlin/io/github/usefulness/testing/screenshot/verification/Recorder.kt b/screenshot-testing-plugin/src/main/kotlin/io/github/usefulness/testing/screenshot/verification/Recorder.kt index deb9665..1a6dfa5 100644 --- a/screenshot-testing-plugin/src/main/kotlin/io/github/usefulness/testing/screenshot/verification/Recorder.kt +++ b/screenshot-testing-plugin/src/main/kotlin/io/github/usefulness/testing/screenshot/verification/Recorder.kt @@ -61,7 +61,12 @@ internal class Recorder( } is ComparisonMethod.RootMeanSquareErrorValue -> { existing, incoming -> - existing.getRootMeetSquare(incoming) + val rms = existing.getRootMeetSquare(incoming) + if (rms > comparisonMethod.tolerance) { + rms + } else { + 0 + } } }