From 911c0880ddc0285155c522a29e7d86dc2eec11bf Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Fri, 28 Oct 2022 11:55:11 -0400 Subject: [PATCH] FIx E2E test util method (#2329) --- e2e/modules/utils.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/e2e/modules/utils.js b/e2e/modules/utils.js index cd1706e4..d5ba1e1f 100644 --- a/e2e/modules/utils.js +++ b/e2e/modules/utils.js @@ -30,15 +30,17 @@ function dirExistsAsync(path) { function mkDirAsync(path) { return new Promise((resolve, reject) => { dirExistsAsync(path).then((exists) => { - if (!exists) { - fs.mkdir(path, {recursive: true}, (error) => { - if (error) { - reject(error); - return; - } - resolve(); - }); + if (exists) { + resolve(); + return; } + fs.mkdir(path, {recursive: true}, (error) => { + if (error) { + reject(error); + return; + } + resolve(); + }); }).catch((err) => { reject(err); });