Skip to content

fix(workers): skip loadTests in run() when suite is already populated - #5721

Open
danikkrapivnitskiy wants to merge 2 commits into
codeceptjs:4.xfrom
danikkrapivnitskiy:fix/workers-skip-reload-when-suite-loaded
Open

danikkrapivnitskiy wants to merge 2 commits into
codeceptjs:4.xfrom
danikkrapivnitskiy:fix/workers-skip-reload-when-suite-loaded

Conversation

@danikkrapivnitskiy

Copy link
Copy Markdown
Contributor

Summary

Tests

  • test/unit/worker_test.js: one worker + grep → expect stats.tests === 1 (JS worker file).
  • Gherkin sandbox (codecept.workers-gherkin.conf.js, workers-gherkin/single.feature) with the same assertion.

Test plan

  • npx mocha test/unit/worker_test.js --grep "should run each assigned"

Made with Cursor

Worker threads call loadTests() in filterTests() before codecept.run().
A second loadTests() in run() duplicated Gherkin suites and executed each
assigned test twice (regression since ESM loadTests in codeceptjs#5640).

Add regression tests for JS and Gherkin worker assignments.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

This branch has not been deployed

No deployments
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