import {spawnSync} from "node:child_process"; const suites = { // Persona-market/roleplay generation protection belonged to the retired feature. // Keep its historical test file available for reference, but do not run it as // part of the supported application contract. backend: ["app", "attachments", "automaticWebSearch", "modelStreaming", "rateLimit", "visionAnalysis", "visionDiagnostics", "webSearch", "webSearchRegression", "workspaceImport"], // reasoning.test.js still contains the retired persona-roleplay workflow; // supported streaming/reasoning coverage remains in modelStreaming and chat tests. frontend: ["api", "attachmentComposer", "chatUsability", "composer", "conversation", "draftStore", "personalities", "regeneration", "regenerationUi", "streamRenderer", "workspaceTransferUi"] }; const suite = process.argv[2]; if (!suites[suite]) throw new Error(`Unknown test suite: ${suite}`); for (const name of suites[suite]) { const result = spawnSync(process.execPath, ["--test", "--test-isolation=none", `test/${name}.test.js`], {stdio: "inherit"}); if (result.error) throw result.error; if (result.status !== 0) process.exit(result.status ?? 1); }