fix: non-block-statement-body-position eslint violation

This commit is contained in:
Stevan Freeborn 2024-02-26 23:26:25 -06:00
parent c2c8e3a279
commit 89abab8265

View file

@ -48,12 +48,24 @@ export class TestTracing {
}
private _shouldCaptureTrace() {
if (process.env.PW_TEST_DISABLE_TRACING) return false;
if (this._options?.mode === 'on') return true;
if (this._options?.mode === 'retain-on-failure') return true;
if (this._options?.mode === 'on-first-retry' && this._testInfo.retry === 1) return true;
if (this._options?.mode === 'on-all-retries' && this._testInfo.retry > 0) return true;
if (this._options?.mode === 'retain-on-first-failure' && this._testInfo.retry === 0) return true;
if (process.env.PW_TEST_DISABLE_TRACING)
return false;
if (this._options?.mode === 'on')
return true;
if (this._options?.mode === 'retain-on-failure')
return true;
if (this._options?.mode === 'on-first-retry' && this._testInfo.retry === 1)
return true;
if (this._options?.mode === 'on-all-retries' && this._testInfo.retry > 0)
return true;
if (this._options?.mode === 'retain-on-first-failure' && this._testInfo.retry === 0)
return true;
return false;
}