Skip to content

Commit

Permalink
[tests] Limit the number of diff chunks to show on failures
Browse files Browse the repository at this point in the history
  • Loading branch information
justinfagnani committed Jun 27, 2024
1 parent 53a827f commit b2ae3c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/tests/src/utils/assert-goldens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ const reset = '\x1b[0m';
*/
export function formatDirDiff(result: dirCompare.Result): string {
const lines = [];
for (const diff of result.diffSet || []) {
// Only show the first 10 diffs.
for (const diff of result.diffSet?.slice(0, 10) || []) {
if (diff.state === 'equal') {
continue;
}
Expand Down

0 comments on commit b2ae3c5

Please sign in to comment.