From ede8917edb2a4c61da0e8b1588a50d45384fa80e Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Sat, 26 Apr 2025 15:44:53 +0200 Subject: [PATCH] test: exclude non-directories from tests --- __tests__/apps.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/__tests__/apps.test.ts b/__tests__/apps.test.ts index 25a335f..ac609f3 100644 --- a/__tests__/apps.test.ts +++ b/__tests__/apps.test.ts @@ -6,7 +6,13 @@ import path from 'node:path' const getApps = async () => { const appsDir = await fs.promises.readdir(path.join(process.cwd(), 'apps')) - return appsDir + + const appDirs = appsDir.filter(async (app) => { + const stat = await fs.promises.stat(path.join(process.cwd(), 'apps', app)) + return stat.isDirectory() + }) + + return appDirs }; const getFile = async (app: string, file: string) => {