Skip to content

Commit

Permalink
Sorts diagnostics in tests for errors on same line (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
markwpearce committed Jun 4, 2024
1 parent 9748fd6 commit ed2fdc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/testHelpers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ export function fmtDiagnostics(diagnostics: BsDiagnostic[]) {
return diagnostics
.filter((d) => d.severity && d.severity < 4)
.sort((a, b) => a.range.start.line - b.range.start.line)
.map((d) => `${pad(d.range.start.line + 1)}:${d.code}:${d.message}`);
.map((d) => `${pad(d.range.start.line + 1)}:${d.code}:${d.message}`)
.sort();
}

/**
Expand Down

0 comments on commit ed2fdc1

Please sign in to comment.