MCPcopy
hub / github.com/codeceptjs/CodeceptJS / _initWorkers

Method _initWorkers

lib/workers.js:312–318  ·  view source on GitHub ↗
(numberOfWorkers, config)

Source from the content-addressed store, hash-verified

310 }
311
312 _initWorkers(numberOfWorkers, config) {
313 this.splitTestsByGroups(numberOfWorkers, config)
314 // For function-based grouping, use the actual number of test groups created
315 const actualNumberOfWorkers = isFunction(config.by) ? this.testGroups.length : numberOfWorkers
316 this.workers = createWorkerObjects(this.testGroups, this.codecept.config, getTestRoot(config.testConfig), config.options, config.selectedRuns)
317 this.numberOfWorkers = this.workers.length
318 }
319
320 /**
321 * This splits tests by groups.

Callers 1

_ensureInitializedMethod · 0.95

Calls 4

splitTestsByGroupsMethod · 0.95
isFunctionFunction · 0.90
getTestRootFunction · 0.90
createWorkerObjectsFunction · 0.85

Tested by

no test coverage detected