Sort tests case-insensitively and without "Test.js"
So HiddenBrowserTest.js doesn't run before advancedSearchTest.js and zoteroPaneTest.js doesn't run before zoteroTest.js
This commit is contained in:
parent
51b615c54c
commit
ce1bdba37a
1 changed files with 7 additions and 1 deletions
|
@ -234,7 +234,13 @@ if (run && ZoteroUnit.tests) {
|
|||
testFiles.push(file.leafName);
|
||||
}
|
||||
}
|
||||
testFiles.sort();
|
||||
testFiles.sort((a, b) => {
|
||||
a = a.replace(/Test.js$/, '').toLowerCase();
|
||||
b = b.replace(/Test.js$/, '').toLowerCase();
|
||||
if (a < b) return -1;
|
||||
if (a > b) return 1;
|
||||
return 0;
|
||||
});
|
||||
|
||||
// Find the start and stop files
|
||||
let startPos = 0;
|
||||
|
|
Loading…
Reference in a new issue