fix(test): prevent env leak causing models.json CI flake

This commit is contained in:
Peter Steinberger
2026-02-22 22:00:38 +00:00
parent 862975507a
commit 4b0fddc075
2 changed files with 17 additions and 12 deletions

View File

@@ -32,9 +32,7 @@ describe("models-config", () => {
});
globalThis.fetch = fetchMock as unknown as typeof fetch;
await ensureOpenClawModelsJson({ models: { providers: {} } });
const agentDir = path.join(process.env.HOME ?? "", ".openclaw", "agents", "main", "agent");
const { agentDir } = await ensureOpenClawModelsJson({ models: { providers: {} } });
expect(await readCopilotBaseUrl(agentDir)).toBe(DEFAULT_COPILOT_API_BASE_URL);
});
});