Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: don't print empty diff (#3437)
  • Loading branch information
sheremet-va committed May 23, 2023
1 parent 41e11da commit 32b5361
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/utils/src/diff.ts
Expand Up @@ -35,6 +35,9 @@ export function unifiedDiff(actual: unknown, expected: unknown, options: DiffOpt
counts['-']++
})

if (counts['+'] === 0 && counts['-'] === 0)
return ''

let legend = ''

if (showLegend) {
Expand Down

0 comments on commit 32b5361

Please sign in to comment.