Skip to content

Commit 9dd6554

Browse files
authored
Simplify commands constructor (#2371)
Change-Id: Ib991998e5c956a2c3f18f11571fa5668798894ea
1 parent a9f15da commit 9dd6554

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/core/engine/commands.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { SimplePerfProfiler } from './command/simpleperf.js';
3636
* @hideconstructor
3737
*/
3838
export class Commands {
39-
constructor(
39+
constructor({
4040
browser,
4141
engineDelegate,
4242
index,
@@ -50,7 +50,7 @@ export class Commands {
5050
asyncScriptsByCategory,
5151
postURLScripts,
5252
options
53-
) {
53+
}) {
5454
const measure = new Measure({
5555
browser,
5656
index,

lib/core/engine/iteration.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,21 @@ export class Iteration {
9797
browser.getDriver()
9898
);
9999

100-
const commands = new Commands(
100+
const commands = new Commands({
101101
browser,
102102
engineDelegate,
103103
index,
104104
result,
105-
this.storageManager,
106-
this.pageCompleteCheck,
105+
storageManager: this.storageManager,
106+
pageCompleteCheck: this.pageCompleteCheck,
107107
context,
108108
videos,
109109
screenshotManager,
110-
this.scriptsByCategory,
111-
this.asyncScriptsByCategory,
112-
this.postURLScripts,
110+
scriptsByCategory: this.scriptsByCategory,
111+
asyncScriptsByCategory: this.asyncScriptsByCategory,
112+
postURLScripts: this.postURLScripts,
113113
options
114-
);
114+
});
115115

116116
await this._loadStartURL(browser, options);
117117

0 commit comments

Comments
 (0)