test: exclude non-directories from tests

This commit is contained in:
Nicolas Meienberger 2025-04-26 15:44:53 +02:00
parent a27233f8af
commit ede8917edb

View file

@ -6,7 +6,13 @@ import path from 'node:path'
const getApps = async () => { const getApps = async () => {
const appsDir = await fs.promises.readdir(path.join(process.cwd(), 'apps')) 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) => { const getFile = async (app: string, file: string) => {