fix: run-workers --by suite parallelization broken by test file sorting by mirao · Pull Request #5419 · codeceptjs/CodeceptJS
…ng (codeceptjs#5412) The sorting of test files in loadTests() (added in codeceptjs#5386) broke the --by suite parallelization. When files were sorted before worker distribution, all workers could receive the same tests instead of different suites being distributed to different workers. Fix: Move testFiles.sort() from loadTests() to run(). This ensures: - Worker distribution uses original (unsorted) file order for consistent distribution across workers - Test execution still uses alphabetical order (sorted in run()) Added unit test to verify files are not sorted after loadTests(). Fixes codeceptjs#5412 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>