
























11// Qa Lab tests cover model catalog plugin behavior.
22import fs from "node:fs/promises";
3-import os from "node:os";
43import path from "node:path";
5-import { describe, expect, it } from "vitest";
4+import { afterEach, describe, expect, it } from "vitest";
65import {
76loadQaRunnerModelOptions,
87parseQaRunnerModelOptionsOutput,
98selectQaRunnerModelOptions,
109} from "./model-catalog.runtime.js";
10+import { createTempDirHarness } from "./temp-dir.test-helper.js";
11+12+const { cleanup, makeTempDir } = createTempDirHarness();
13+14+afterEach(cleanup);
11151216async function waitForFile(filePath: string, timeoutMs: number): Promise<void> {
1317const deadlineAt = Date.now() + timeoutMs;
@@ -103,7 +107,7 @@ describe("qa runner model catalog", () => {
103107it.runIf(process.platform !== "win32")(
104108"kills aborted catalog process groups when the catalog child exits first",
105109async () => {
106-const repoRoot = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-qa-model-catalog-"));
110+const repoRoot = await makeTempDir("openclaw-qa-model-catalog-");
107111const pidPath = path.join(repoRoot, "descendant.pid");
108112let descendantPid: number | undefined;
109113const controller = new AbortController();
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。