From 647bf4a4e00513840a3921acc9c1b61a5fecb877 Mon Sep 17 00:00:00 2001 From: Bayheck Date: Sat, 24 Aug 2024 20:25:27 +0500 Subject: [PATCH] fix: pr comments fixed --- src/test-run/index.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test-run/index.ts b/src/test-run/index.ts index 4633199847..fd15e72b89 100644 --- a/src/test-run/index.ts +++ b/src/test-run/index.ts @@ -545,8 +545,7 @@ export default class TestRun extends AsyncEventEmitter { } private async _initRequestHooks (): Promise { - if (!this.test.skip) - await Promise.all(this.test.requestHooks.map(hook => this._initRequestHook(hook))); + await Promise.all(this.test.requestHooks.map(hook => this._initRequestHook(hook))); } private _prepareSkipJsErrorsOption (): boolean | ExecuteClientFunctionCommand { @@ -1444,8 +1443,10 @@ export default class TestRun extends AsyncEventEmitter { } public async initialize (): Promise { - await this._clearCookiesAndStorages(); - await this._initRequestHooks(); + if (!this.test.skip) { + await this._clearCookiesAndStorages(); + await this._initRequestHooks(); + } } private async _clearCookiesAndStorages (): Promise {