UNPKG

539 BJavaScriptView Raw
1'use strict';
2
3const { spawnSync } = require('child_process');
4const { readdirSync } = require('fs');
5const { join } = require('path');
6
7const files = readdirSync(__dirname).sort();
8for (const filename of files) {
9 if (filename.startsWith('test-')) {
10 const path = join(__dirname, filename);
11 console.log(`> Running ${filename} ...`);
12 const result = spawnSync(`${process.argv0} ${path}`, {
13 shell: true,
14 stdio: 'inherit',
15 windowsHide: true
16 });
17 if (result.status !== 0)
18 process.exitCode = 1;
19 }
20}