From d579d89443c42a0da73dc4de162a4abae7f85f77 Mon Sep 17 00:00:00 2001 From: Jose C Quintas Jr Date: Tue, 3 Dec 2024 09:20:53 +0100 Subject: [PATCH] [code-infra] Check if `preset-safe` folder exists in codemod test (#15703) --- packages/x-codemod/src/v8.0.0/preset-safe/preset-safe.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/x-codemod/src/v8.0.0/preset-safe/preset-safe.test.ts b/packages/x-codemod/src/v8.0.0/preset-safe/preset-safe.test.ts index 84b3d9c6e9af..90a28d50b7c8 100644 --- a/packages/x-codemod/src/v8.0.0/preset-safe/preset-safe.test.ts +++ b/packages/x-codemod/src/v8.0.0/preset-safe/preset-safe.test.ts @@ -14,7 +14,9 @@ function getAllDirs() { .readdirSync(path.resolve(__dirname, '..')) .filter( (file) => - fs.statSync(path.resolve(__dirname, '..', file)).isDirectory() && file !== 'preset-safe', + fs.statSync(path.resolve(__dirname, '..', file)).isDirectory() && + file !== 'preset-safe' && + fs.existsSync(path.resolve(__dirname, '..', file, 'preset-safe')), ); }