test: exclude non-directories from tests
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user