mirror of
https://github.com/Ryder-Sun/Meldwork.git
synced 2026-11-07 06:56:03 -10:00
Extract V4 outcome validation helpers from the local auto runner, add recursive desktop test discovery suites, and harden CLI stdin pipe failures. Checks: npm --prefix desktop test -- --suite workspace --test-name-pattern 'auto runner support|v4'; npm --prefix desktop test
20 lines
527 B
JavaScript
20 lines
527 B
JavaScript
const { spawnSync } = require('node:child_process')
|
|
const { discoverTestFiles } = require('./test-discovery.cjs')
|
|
|
|
function option(name, fallback) {
|
|
const index = process.argv.indexOf(name)
|
|
return index === -1 ? fallback : process.argv[index + 1] || fallback
|
|
}
|
|
|
|
const suite = option('--suite', 'all')
|
|
const result = spawnSync(process.execPath, [
|
|
'--test',
|
|
'--test-concurrency=2',
|
|
...discoverTestFiles({ suite }),
|
|
], {
|
|
stdio: 'inherit',
|
|
})
|
|
|
|
if (result.error) throw result.error
|
|
process.exitCode = result.status ?? 1
|