Ensure test files are executed in alphabetical order by DenysKuchma · Pull Request #5386 · codeceptjs/CodeceptJS

@DenysKuchma

@DenysKuchma

This was referenced

Jan 15, 2026

@mirao mirao mentioned this pull request

Jan 26, 2026

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>

This was referenced

Jan 26, 2026

DavertMik pushed a commit that referenced this pull request

Feb 8, 2026
…ng (#5412) (#5419)

The sorting of test files in loadTests() (added in #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 #5412

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

mirao added a commit to mirao/CodeceptJS that referenced this pull request

Feb 9, 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>

mirao added a commit to mirao/CodeceptJS that referenced this pull request

Feb 9, 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>