Skip to content

Commit acad276

Browse files
DavertMikMykhailo BodnarchukPaul Vincent Beigang
authored
[WIP] updated docs and worker events (#2249)
* updated docs and worker events * Store --profile in process.env.profile instead of process.profile to make it available in workers. * Revert "Store --profile in process.env.profile instead of process.profile to make it available in workers." This reverts commit 6dd2b8a. * fixed merge for workers Co-authored-by: Mykhailo Bodnarchuk <mykhailo.bodnarchuk@Mykhailos-MBP.hq.wetransfer.com> Co-authored-by: Paul Vincent Beigang <paul.beigang@digistore24.com>
1 parent f8537c8 commit acad276

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

docs/parallel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const testGroups = workers.createGroupsOfSuites(2);
7474
const browsers = ['firefox', 'chrome'];
7575

7676
const configs = browsers.map(browser => {
77-
return helpers: {
77+
return helpers: {
7878
WebDriver: { browser }
7979
}
8080
});
@@ -127,7 +127,7 @@ If you want your tests to split according to your need this method is suited for
127127
```js
128128

129129
/*
130-
Define a function to split your tests, Here its hardcoded, But you write a logic to split your tests
130+
Define a function to split your tests.
131131
132132
function should return an array with this format [[file1, file2], [file3], ...]
133133

lib/workers.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,10 @@ class Workers extends EventEmitter {
250250
* @param {Number} numberOfWorkers
251251
*/
252252
createGroupsOfSuites(numberOfWorkers) {
253-
const files = this.codecept.testFiles;
254-
const mocha = Container.mocha();
255-
mocha.files = files;
256-
mocha.loadFiles();
257253
const groups = populateGroups(numberOfWorkers);
258254

255+
const mocha = Container.mocha();
256+
259257
mocha.suite.suites.forEach((suite) => {
260258
const i = indexOfSmallestElement(groups);
261259
suite.tests.forEach((test) => {

0 commit comments

Comments
 (0)