import { spawnSync } from 'node:child_process'; import { fileURLToPath } from 'node:url'; // CI mode makes missing snapshots fail. Never forward --update or automatically // accept new expectations: a failing established import blocks the release. const root = fileURLToPath(new URL('../', import.meta.url)); const result = spawnSync(process.execPath, [ fileURLToPath(new URL('../node_modules/vitest/vitest.mjs', import.meta.url)), 'run', '--config', 'vitest.config.ts', 'tests/importers', 'tests/scoring', 'tests/server/node-import-engine.test.ts', 'tests/server/import-worker-client.test.ts', 'tests/server/import-base64.test.ts', 'tests/server/import-batch-http.test.ts', 'tests/server/assessor-http-server.test.ts', 'tests/server/gpo-', 'tests/server/gpp-', 'tests/server/registry-policy-parser.test.ts', 'tests/server/security-template-parser.test.ts', 'tests/server/group-policy-preference-parser.test.ts', 'tests/server/advanced-audit-parser.test.ts', 'tests/server/admx-policy-catalog.test.ts', 'tests/domain/gpo-ingestion.test.ts', ], { cwd: root, env: { ...process.env, CI: 'true' }, stdio: 'inherit' }); if (result.error) console.error(result.error.message); process.exit(result.status ?? 1);