Skip to content

Commit

Permalink
Refactor message to fix misspell finding
Browse files Browse the repository at this point in the history
Refactor message of diff matcher to get rid of misspell finding.
  • Loading branch information
HeavyWombat committed Jun 5, 2024
1 parent 7c94fb2 commit 6e89dd0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions pkg/dyff/core_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,23 @@ func (matcher *diffMatcher) Match(actual interface{}) (success bool, err error)
}

func (matcher *diffMatcher) FailureMessage(actual interface{}) string {
return fmt.Sprintf("Expected\n\t%s\nto be same as\n\t%s",
return fmt.Sprintf(
`Expected
%s
to be same as
%s
`,
spew.Sdump(actual),
spew.Sdump(matcher.expected))
}

func (matcher *diffMatcher) NegatedFailureMessage(actual interface{}) string {
return fmt.Sprintf("Expected\n\t%s\nnot to be same as\n\t%s",
return fmt.Sprintf(
`Expected
%s
not to be same as
%s
`,
spew.Sdump(actual),
spew.Sdump(matcher.expected),
)
Expand Down

0 comments on commit 6e89dd0

Please sign in to comment.