Skip to content

Commit 78ab7b9

Browse files
CvXljharb
authored andcommitted
Sort issues by package name
Fixes a flaky test: ``` ​ FAIL ​ tests/unlicensed-subdependency/test.js ✖ should be equal tests/unlicensed-subdependency/test.js 5 | tap.equal(results.status, 1) 6 | > 7 | tap.equal( | ----^ 8 | results.stdout.trim(), 9 | [ 10 | '[email protected]', --- expected +++ actual @@ -1,15 +1,15 @@ [email protected] [email protected] NOT APPROVED - Terms: MIT - Repository: jslicense/mit-licensed-depends-on-not-licensed.js + Terms: Invalid license metadata + Repository: jslicense/not-licensed.js Homepage: None listed Author: Kyle E. Mitchell <[email protected]> (https://kemitchell.com/) Contributors: None listed [email protected] [email protected] NOT APPROVED - Terms: Invalid license metadata - Repository: jslicense/not-licensed.js + Terms: MIT + Repository: jslicense/mit-licensed-depends-on-not-licensed.js Homepage: None listed Author: Kyle E. Mitchell <[email protected]> (https://kemitchell.com/) Contributors: None listed test: tests/unlicensed-subdependency/test.js stack: | Object.<anonymous> (tests/unlicensed-subdependency/test.js:7:5) Module.replacementCompile (node_modules/append-transform/index.js:60:13) Object.<anonymous> (node_modules/append-transform/index.js:64:4) ​ FAIL ​ tests/unlicensed-subdependency/test.js 1 failed of 2 16.992ms ✖ should be equal 🌈 SUMMARY RESULTS 🌈 ​ FAIL ​ tests/unlicensed-subdependency/test.js 1 failed of 2 16.992ms ✖ should be equal ```
1 parent 801ed66 commit 78ab7b9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: index.js

+5
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ function findIssues (configuration, dependencies) {
101101
results.push(result)
102102
}
103103
})
104+
105+
results.sort(function (a, b) {
106+
return a.name.localeCompare(b.name)
107+
})
108+
104109
return results
105110
}
106111

0 commit comments

Comments
 (0)