Skip to content

Commit

Permalink
Remove redundant async file check
Browse files Browse the repository at this point in the history
Signed-off-by: Zabil Cheriya Maliackal <zabilcm@gmail.com>
  • Loading branch information
zabil committed Jun 5, 2024
1 parent a107bc0 commit ab0b768
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 1 addition & 5 deletions src/processors/ExecutionProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ export class ExecutionProcessor {
method: CommonFunction,
params: unknown[],
): Promise<void> {
if (Util.isAsync(method)) {
await method.apply(instance, params);
} else {
method.apply(instance, params);
}
await method.apply(instance, params);
}
}
4 changes: 0 additions & 4 deletions src/utils/Util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ export class Util {
return fileName;
}

public static isAsync(m: CommonFunction): boolean {
return m instanceof (async () => {}).constructor;
}

public static getUniqueScreenshotFileName(): string {
const dir = (process.env.gauge_screenshots_dir as string) ?? "";

Expand Down

0 comments on commit ab0b768

Please sign in to comment.