gongxiangp2/scripts/test-all.mjs

16 lines
424 B
JavaScript

import { spawnSync } from 'node:child_process'
for (const args of [
['run', 'test', '--', '--maxWorkers=2'],
['run', 'test:scripts'],
['run', 'test:agent'],
]) {
const result = spawnSync(process.execPath, [process.env.npm_execpath, ...args], { stdio: 'inherit' })
if (result.error) throw result.error
if (result.signal) {
process.exitCode = 1
break
}
if (result.status !== 0) process.exitCode = 1
}