diff --git a/pkg/dyff/compare_test.go b/pkg/dyff/compare_test.go index f63a2f3..7c20d6d 100644 --- a/pkg/dyff/compare_test.go +++ b/pkg/dyff/compare_test.go @@ -831,6 +831,19 @@ listY: [ Yo, Yo, Yo ] Expect(report.ExcludeRegexp("/does/not/exist")).To(BeEquivalentTo(report)) }) + + It("should ignore changes in values", func() { + report := dyff.Report{Diffs: []dyff.Diff{ + singleDiff("/yaml/map/add", dyff.ADDITION, nil, "added"), + singleDiff("/yaml/map/removed", dyff.REMOVAL, nil, "removed"), + singleDiff("/yaml/map/changed", dyff.MODIFICATION, "foobar", "barfoo"), + }} + + Expect(report.IgnoreValueChanges()).To(BeEquivalentTo(dyff.Report{Diffs: []dyff.Diff{ + singleDiff("/yaml/map/add", dyff.ADDITION, nil, "added"), + singleDiff("/yaml/map/removed", dyff.REMOVAL, nil, "removed"), + }})) + }) }) Context("change root for comparison", func() {