From ca053e212188224e5836a405c2dab8a1ceb516bb Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Tue, 17 Mar 2026 09:03:16 +0100 Subject: [PATCH] Simplify commands constructor Change-Id: Ib991998e5c956a2c3f18f11571fa5668798894ea --- lib/core/engine/commands.js | 4 ++-- lib/core/engine/iteration.js | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/core/engine/commands.js b/lib/core/engine/commands.js index b5911f5ee..550c31224 100644 --- a/lib/core/engine/commands.js +++ b/lib/core/engine/commands.js @@ -36,7 +36,7 @@ import { SimplePerfProfiler } from './command/simpleperf.js'; * @hideconstructor */ export class Commands { - constructor( + constructor({ browser, engineDelegate, index, @@ -50,7 +50,7 @@ export class Commands { asyncScriptsByCategory, postURLScripts, options - ) { + }) { const measure = new Measure({ browser, index, diff --git a/lib/core/engine/iteration.js b/lib/core/engine/iteration.js index 8c6523f9a..2894f3b7c 100644 --- a/lib/core/engine/iteration.js +++ b/lib/core/engine/iteration.js @@ -97,21 +97,21 @@ export class Iteration { browser.getDriver() ); - const commands = new Commands( + const commands = new Commands({ browser, engineDelegate, index, result, - this.storageManager, - this.pageCompleteCheck, + storageManager: this.storageManager, + pageCompleteCheck: this.pageCompleteCheck, context, videos, screenshotManager, - this.scriptsByCategory, - this.asyncScriptsByCategory, - this.postURLScripts, + scriptsByCategory: this.scriptsByCategory, + asyncScriptsByCategory: this.asyncScriptsByCategory, + postURLScripts: this.postURLScripts, options - ); + }); await this._loadStartURL(browser, options);