chore: sort files alphabetically

This commit is contained in:
John Kleinschmidt
2024-12-02 11:01:45 -05:00
parent 9814fab669
commit d9e217ffb1

View File

@@ -1,6 +1,5 @@
const glob = require('glob');
const fs = require('node:fs');
const path = require('node:path');
const currentShard = parseInt(process.argv[2], 10);
@@ -14,15 +13,7 @@ for (let i = 0; i < shardCount; i++) {
buckets.push([]);
}
const testsInSpecFile = Object.create(null);
for (const specFile of specFiles) {
const testContent = fs.readFileSync(specFile, 'utf8');
testsInSpecFile[specFile] = testContent.split('it(').length;
}
specFiles.sort((a, b) => {
return testsInSpecFile[b] - testsInSpecFile[a];
});
specFiles.sort();
let shard = 0;
for (const specFile of specFiles) {