Skip to content

Commit

Permalink
fix: Removed redundant iterator in sort map (#15184)
Browse files Browse the repository at this point in the history
  • Loading branch information
Connormiha authored Jul 15, 2024
1 parent 1b2a2f4 commit fb207dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jest-diff/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ function comparePrimitive(
}

function sortMap(map: Map<unknown, unknown>) {
return new Map([...map.entries()].sort());
return new Map([...map].sort());
}

function sortSet(set: Set<unknown>) {
return new Set([...set.values()].sort());
return new Set([...set].sort());
}

function compareObjects(
Expand Down

0 comments on commit fb207dd

Please sign in to comment.