test: exclude non-directories from tests
This commit is contained in:
parent
a27233f8af
commit
ede8917edb
1 changed files with 7 additions and 1 deletions
|
|
@ -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) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue