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')), ); }