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); });