Skip to content

Commit

Permalink
test: Sort messages as XML findings could be random
Browse files Browse the repository at this point in the history
  • Loading branch information
d3xter666 committed Feb 10, 2025
1 parent 45fe3c7 commit 958c3e3
Show file tree
Hide file tree
Showing 13 changed files with 608 additions and 614 deletions.
3 changes: 3 additions & 0 deletions test/lib/linter/_linterHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ function testDefinition(
// Use only the file name without the directory (which might contain modifiers)
result.filePath = resultFileName;
}

result.messages.sort(
(a, b) => (a.line! - b.line!) + (a.column! - b.column!));
});
t.snapshot(res);
});
Expand Down
16 changes: 8 additions & 8 deletions test/lib/linter/rules/snapshots/Directives.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,6 @@ Generated by [AVA](https://avajs.dev).
ruleId: 'no-deprecated-api',
severity: 2,
},
{
column: 6,
line: 108,
message: 'Access of global variable \'sap\' (sap.m.Button)',
messageDetails: 'Do not use global variables to access UI5 modules or APIs. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)',
ruleId: 'no-globals',
severity: 2,
},
{
column: 3,
line: 110,
Expand All @@ -79,6 +71,14 @@ Generated by [AVA](https://avajs.dev).
ruleId: 'no-deprecated-api',
severity: 2,
},
{
column: 6,
line: 108,
message: 'Access of global variable \'sap\' (sap.m.Button)',
messageDetails: 'Do not use global variables to access UI5 modules or APIs. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)',
ruleId: 'no-globals',
severity: 2,
},
{
column: 3,
line: 111,
Expand Down
Binary file modified test/lib/linter/rules/snapshots/Directives.ts.snap
Binary file not shown.
Loading

0 comments on commit 958c3e3

Please sign in to comment.