Skip to content

Conversation

@DenysKuchma
Copy link
Collaborator

Add sort() after loading test files to maintain alphabetical order: #5384

@DenysKuchma DenysKuchma requested a review from DavertMik January 14, 2026 13:55
@DavertMik DavertMik merged commit 9edec72 into 3.x Jan 15, 2026
11 of 14 checks passed
@kobenguyent kobenguyent deleted the fix/5384-alphabetical-test-order branch January 15, 2026 15:03
mirao added a commit to mirao/CodeceptJS that referenced this pull request Jan 26, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants