MCPcopy Create free account
hub / github.com/webdriverio/webdriverio / constructor

Method constructor

packages/wdio-cli/src/interface.ts:57–81  ·  view source on GitHub ↗
(
        private _config: WebdriverIO.Config,
        public totalWorkerCnt: number,
        private _isWatchMode = false
    )

Source from the content-addressed store, hash-verified

55 }
56
57 constructor(
58 private _config: WebdriverIO.Config,
59 public totalWorkerCnt: number,
60 private _isWatchMode = false
61 ) {
62 super()
63
64 /**
65 * Colors can be forcibly enabled/disabled with env variable `FORCE_COLOR`
66 * `FORCE_COLOR=1` - forcibly enable colors
67 * `FORCE_COLOR=0` - forcibly disable colors
68 */
69 this.hasAnsiSupport = supportsColor && supportsColor.hasBasic
70
71 this.totalWorkerCnt = totalWorkerCnt
72 this._isWatchMode = _isWatchMode
73 this._specFileRetries = _config.specFileRetries || 0
74 this._specFileRetriesDelay = _config.specFileRetriesDelay || 0
75
76 this.on('job:start', this.addJob.bind(this))
77 this.on('job:end', this.clearJob.bind(this))
78
79 this.setup()
80 this.onStart()
81 }
82
83 #hasShard() {
84 return this._config.shard && this._config.shard.total !== 1

Callers

nothing calls this directly

Calls 3

setupMethod · 0.95
onStartMethod · 0.95
onMethod · 0.65

Tested by

no test coverage detected