From 4963b99051f96dec01a423ae842c6a427bbee19b Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Thu, 7 Nov 2024 10:18:15 +0100 Subject: [PATCH] fix: add missing await --- tests/e2e/testRunner.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/e2e/testRunner.ts b/tests/e2e/testRunner.ts index 8efeef85dcf5..f68a3d6a9fba 100644 --- a/tests/e2e/testRunner.ts +++ b/tests/e2e/testRunner.ts @@ -288,7 +288,7 @@ const runTests = async (): Promise => { // eslint-disable-next-line @typescript-eslint/restrict-template-expressions Logger.error(`Warmup failed with error: ${e}`); - closeANRPopup(); + await closeANRPopup(); MeasureUtils.stop('error-warmup'); server.clearAllTestDoneListeners(); @@ -312,11 +312,11 @@ const runTests = async (): Promise => { // We run each test multiple time to average out the results for (let testIteration = 0; testIteration < config.RUNS; testIteration++) { - const onError = (e: Error) => { + const onError = async (e: Error) => { // eslint-disable-next-line @typescript-eslint/restrict-template-expressions Logger.error(`Unexpected error during test execution: ${e}. `); MeasureUtils.stop('error'); - closeANRPopup(); + await closeANRPopup(); server.clearAllTestDoneListeners(); errorCountRef.errorCount += 1; if (testIteration === 0 || errorCountRef.errorCount === errorCountRef.allowedExceptions) { @@ -344,7 +344,7 @@ const runTests = async (): Promise => { // Run the test on the delta app: await runTestIteration(config.DELTA_APP_PACKAGE, deltaIterationText, config.BRANCH_DELTA, launchArgs); } catch (e) { - onError(e as Error); + await onError(e as Error); } } } catch (exception) {