From d9e217ffb1522076e150fce9e43a31bf56716acb Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 2 Dec 2024 11:01:45 -0500 Subject: [PATCH] chore: sort files alphabetically --- script/split-tests.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/script/split-tests.js b/script/split-tests.js index 51c0ad7f67..8cfdf24860 100644 --- a/script/split-tests.js +++ b/script/split-tests.js @@ -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) {