Skip to content

Commit 528d650

Browse files
committed
test: filter playground directories when looking for projects
1 parent b6cea77 commit 528d650

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/test.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import 'zx/globals'
55
process.env.CI = '1';
66

77
const playgroundDir = path.resolve(__dirname, '../playground/')
8-
let projects = fs.readdirSync(playgroundDir).filter(name => !name.startsWith('.'));
8+
let projects = fs.readdirSync(playgroundDir, { withFileTypes: true })
9+
.filter(dirent => dirent.isDirectory())
10+
.map(dirent => dirent.name)
11+
.filter(name => !name.startsWith('.') && name !== 'node_modules')
912

1013
if (process.argv[3])
1114
projects = projects.filter(project => project.includes(process.argv[3]))

0 commit comments

Comments
 (0)