* @param {Number} numberOfWorkers * @param {Object} config
(numberOfWorkers, config = { by: 'test' })
| 273 | * @param {Object} config |
| 274 | */ |
| 275 | constructor(numberOfWorkers, config = { by: 'test' }) { |
| 276 | super() |
| 277 | this.setMaxListeners(50) |
| 278 | this.codeceptPromise = initializeCodecept(config.testConfig, config.options) |
| 279 | this.codecept = null |
| 280 | this.config = config // Save config |
| 281 | this.numberOfWorkersRequested = numberOfWorkers // Save requested worker count |
| 282 | this.options = config.options || {} |
| 283 | this.errors = [] |
| 284 | this.numberOfWorkers = 0 |
| 285 | this.closedWorkers = 0 |
| 286 | this.workers = [] |
| 287 | this.testGroups = [] |
| 288 | this.testPool = [] |
| 289 | this.testPoolInitialized = false |
| 290 | this.isPoolMode = config.by === 'pool' |
| 291 | this.activeWorkers = new Map() |
| 292 | this.maxWorkers = numberOfWorkers // Track original worker count for pool mode |
| 293 | |
| 294 | createOutputDir(config.testConfig) |
| 295 | // Defer worker initialization until codecept is ready |
| 296 | } |
| 297 | |
| 298 | async _ensureInitialized() { |
| 299 | if (!this.codecept) { |
nothing calls this directly
no test coverage detected