FIx E2E test util method (#2329)

This commit is contained in:
Devin Binnie
2022-10-28 11:55:11 -04:00
committed by GitHub
parent ca62814ce6
commit 911c0880dd

View File

@@ -30,15 +30,17 @@ function dirExistsAsync(path) {
function mkDirAsync(path) { function mkDirAsync(path) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
dirExistsAsync(path).then((exists) => { dirExistsAsync(path).then((exists) => {
if (!exists) { if (exists) {
fs.mkdir(path, {recursive: true}, (error) => { resolve();
if (error) { return;
reject(error);
return;
}
resolve();
});
} }
fs.mkdir(path, {recursive: true}, (error) => {
if (error) {
reject(error);
return;
}
resolve();
});
}).catch((err) => { }).catch((err) => {
reject(err); reject(err);
}); });