Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/codecept.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,11 @@ class Codecept {
// Ignore if gherkin module not available
}

// Sort test files alphabetically for consistent execution order
this.testFiles.sort()
// Sort test files alphabetically for consistent execution order,
// but skip sorting when --shuffle is active so the randomised order is preserved.
if (!this.opts.shuffle) {
this.testFiles.sort()
}

return new Promise((resolve, reject) => {
const mocha = container.mocha()
Expand Down
Loading