diff --git a/src/server/visual-diff-plugin.js b/src/server/visual-diff-plugin.js index f0a511c2..c8faa357 100644 --- a/src/server/visual-diff-plugin.js +++ b/src/server/visual-diff-plugin.js @@ -121,12 +121,9 @@ export function visualDiff({ updateGoldens = false, runSubset = false } = {}) { if (runSubset || currentRun > 0) { if (!clearedDirs.has(newPath)) { - const promise = clearDir(updateGoldens, newPath); - clearedDirs.set(newPath, promise); - await promise; - } else { - await clearedDirs.get(newPath); + clearedDirs.set(newPath, clearDir(updateGoldens, newPath)); } + await clearedDirs.get(newPath); } }