diff options
Diffstat (limited to 'src/test.js')
-rw-r--r-- | src/test.js | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/test.js b/src/test.js deleted file mode 100644 index 6a92978..0000000 --- a/src/test.js +++ /dev/null @@ -1,22 +0,0 @@ -import fs from 'node:fs'; -import { execSync } from 'node:child_process'; - -function recursiveScanDir(path, f) -{ - let dirs = []; - for (let dirent of fs.readdirSync(path, { withFileTypes: true })) { - if (dirent.isDirectory()) dirs.push(`${path}/${dirent.name}`); - else f(`${path}/${dirent.name}`); - } - for (let dir of dirs) { - recursiveScanDir(dir, f); - } -} - -recursiveScanDir('.', fname => { - if (fname.endsWith('.test.js')) { - console.log(`======== ${fname} ========`); - execSync(`node ${fname}`, { stdio: 'inherit' }); - console.log(''); - } -}); |