Files
Ryder Sun da0108abb1 refactor: split auto runner outcome helpers
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
2026-08-21 18:01:50 +08:00

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