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

Method clearJob

packages/wdio-cli/src/interface.ts:201–226  ·  view source on GitHub ↗

* clear job from interface

({ cid, passed, retries }: { cid: string, passed: boolean, retries: number })

Source from the content-addressed store, hash-verified

199 * clear job from interface
200 */
201 clearJob({ cid, passed, retries }: { cid: string, passed: boolean, retries: number }) {
202 const job = this._jobs.get(cid)
203
204 this._jobs.delete(cid)
205 const retryAttempts = this._specFileRetries - retries
206 const retry = !passed && retries > 0
207 if (!retry) {
208 this.result.finished++
209 }
210
211 if (job && job.hasTests === false) {
212 return this.onSpecSkip(cid, job)
213 }
214
215 if (passed) {
216 this.result.passed++
217 this.onSpecPass(cid, job, retryAttempts)
218 } else if (retry) {
219 this.totalWorkerCnt++
220 this.result.retries++
221 this.onSpecRetry(cid, job, retryAttempts)
222 } else {
223 this.result.failed++
224 this.onSpecFailure(cid, job, retryAttempts)
225 }
226 }
227
228 /**
229 * for testing purposes call console log in a static method

Callers

nothing calls this directly

Calls 5

onSpecSkipMethod · 0.95
onSpecPassMethod · 0.95
onSpecRetryMethod · 0.95
onSpecFailureMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected