Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix: collect all errors in removeFolders (#28239)

itchyny440f5e5d2be2
diff --git a/packages/playwright-core/src/utils/fileUtils.ts b/packages/playwright-core/src/utils/fileUtils.ts
index 287899d509..751878a869 100644
--- a/packages/playwright-core/src/utils/fileUtils.ts
+++ b/packages/playwright-core/src/utils/fileUtils.ts
@@ -28,8 +28,8 @@ export async function mkdirIfNeeded(filePath: string) {
export async function removeFolders(dirs: string[]): Promise<Error[]> {
return await Promise.all(dirs.map((dir: string) =>
- fs.promises.rm(dir, { recursive: true, force: true, maxRetries: 10 })
- )).catch(e => e);
+ fs.promises.rm(dir, { recursive: true, force: true, maxRetries: 10 }).catch(e => e)
+ ));
}
export function canAccessFile(file: string) {