14 lines
855 B
JavaScript
14 lines
855 B
JavaScript
import {spawnSync} from "node:child_process";
|
|
|
|
const suites = {
|
|
backend: ["app", "attachments", "automaticWebSearch", "generationProtection", "modelStreaming", "rateLimit", "visionAnalysis", "visionDiagnostics", "webSearch", "webSearchRegression", "workspaceImport"],
|
|
frontend: ["api", "attachmentComposer", "chatUsability", "composer", "conversation", "draftStore", "personalities", "reasoning", "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);
|
|
}
|