Skip to content

Commit 2c3a178

Browse files
committed
Tweak test locations
1 parent 3159891 commit 2c3a178

22 files changed

+9
-2
lines changed

compatible.test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ import { LogicEngine, AsyncLogicEngine } from './index.js'
44

55
const tests = []
66

7-
// get all json files from "suites" directory
8-
const files = fs.readdirSync('./suites')
7+
// get all json files from "suites" directory, 1 layer of depth
8+
const files = fs.readdirSync('./suites', { withFileTypes: true }).flatMap(i => {
9+
if (i.isDirectory()) return fs.readdirSync(`./suites/${i.name}`).map(j => `${i.name}/${j}`)
10+
return i.name
11+
})
12+
913
for (const file of files) {
1014
if (file.endsWith('.json')) {
1115
tests.push(...JSON.parse(fs.readFileSync(`./suites/${file}`).toString()).filter(i => typeof i !== 'string').map(i => {

0 commit comments

Comments
 (0)