From 89abab826532b00a4e36f6a4fb2f47827086866b Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Mon, 26 Feb 2024 23:26:25 -0600 Subject: [PATCH] fix: non-block-statement-body-position eslint violation --- packages/playwright/src/worker/testTracing.ts | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/packages/playwright/src/worker/testTracing.ts b/packages/playwright/src/worker/testTracing.ts index bde5cd47a5..c9ad6839b7 100644 --- a/packages/playwright/src/worker/testTracing.ts +++ b/packages/playwright/src/worker/testTracing.ts @@ -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; }