test: fix async loop
This commit is contained in:
parent
75d9286195
commit
ccc939cd99
2 changed files with 3 additions and 3 deletions
|
|
@ -13,7 +13,7 @@ This repository serves as a template for creating your own custom app store for
|
||||||
- `description.md`: Markdown description of the app
|
- `description.md`: Markdown description of the app
|
||||||
- `logo.jpg`: App logo image
|
- `logo.jpg`: App logo image
|
||||||
|
|
||||||
- ****tests**/**: Contains test files for the app store
|
- **tests/**: Contains test files for the app store
|
||||||
|
|
||||||
- `apps.test.ts`: Test suite for validating apps
|
- `apps.test.ts`: Test suite for validating apps
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ 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'))
|
||||||
|
|
||||||
const appDirs = appsDir.filter(async (app) => {
|
const appDirs = appsDir.filter((app) => {
|
||||||
const stat = await fs.promises.stat(path.join(process.cwd(), 'apps', app))
|
const stat = fs.statSync(path.join(process.cwd(), 'apps', app))
|
||||||
return stat.isDirectory()
|
return stat.isDirectory()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue