Skip to content

Commit

Permalink
fix: add missing await
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Nov 7, 2024
1 parent 1fa5412 commit 4963b99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/e2e/testRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ const runTests = async (): Promise<void> => {
// 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();

Expand All @@ -312,11 +312,11 @@ const runTests = async (): Promise<void> => {

// 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) {
Expand Down Expand Up @@ -344,7 +344,7 @@ const runTests = async (): Promise<void> => {
// 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) {
Expand Down

0 comments on commit 4963b99

Please sign in to comment.