From 69c8bd7553a624e784ba8e226ef9d10e54382bca Mon Sep 17 00:00:00 2001 From: William Grant Date: Thu, 20 Jul 2023 14:29:09 +1000 Subject: [PATCH] fix: revert rm to rmdirSync so we don't remove config files before a test has been completed --- ts/test/automation/setup/beforeEach.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/test/automation/setup/beforeEach.ts b/ts/test/automation/setup/beforeEach.ts index 6ba353549..016cf072d 100644 --- a/ts/test/automation/setup/beforeEach.ts +++ b/ts/test/automation/setup/beforeEach.ts @@ -1,5 +1,5 @@ import { Page } from '@playwright/test'; -import { readdirSync, rm } from 'fs-extra'; +import { readdirSync, rmdirSync } from 'fs-extra'; import { join } from 'path'; import { homedir } from 'os'; import { isLinux, isMacOS } from '../../../OS'; @@ -43,7 +43,7 @@ function cleanUpOtherTest() { allAppDataPath.map(folder => { const pathToRemove = join(parentFolderOfAllDataPath, folder); - rm(pathToRemove, { recursive: true }, () => pathToRemove); + rmdirSync(pathToRemove, { recursive: true }); }); console.info('...done'); }