mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 06:47:26 +00:00
test: skip unix-path OPENCLAW_HOME tests on Windows (#12206)
This commit is contained in:
@@ -207,14 +207,16 @@ describe("resolveAgentConfig", () => {
|
|||||||
expect(result?.workspace).toBe("~/openclaw");
|
expect(result?.workspace).toBe("~/openclaw");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("uses OPENCLAW_HOME for default agent workspace", () => {
|
// Unix-style paths behave differently on Windows; skip there
|
||||||
|
it.skipIf(process.platform === "win32")("uses OPENCLAW_HOME for default agent workspace", () => {
|
||||||
vi.stubEnv("OPENCLAW_HOME", "/srv/openclaw-home");
|
vi.stubEnv("OPENCLAW_HOME", "/srv/openclaw-home");
|
||||||
|
|
||||||
const workspace = resolveAgentWorkspaceDir({} as OpenClawConfig, "main");
|
const workspace = resolveAgentWorkspaceDir({} as OpenClawConfig, "main");
|
||||||
expect(workspace).toBe("/srv/openclaw-home/.openclaw/workspace");
|
expect(workspace).toBe("/srv/openclaw-home/.openclaw/workspace");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("uses OPENCLAW_HOME for default agentDir", () => {
|
// Unix-style paths behave differently on Windows; skip there
|
||||||
|
it.skipIf(process.platform === "win32")("uses OPENCLAW_HOME for default agentDir", () => {
|
||||||
vi.stubEnv("OPENCLAW_HOME", "/srv/openclaw-home");
|
vi.stubEnv("OPENCLAW_HOME", "/srv/openclaw-home");
|
||||||
|
|
||||||
const agentDir = resolveAgentDir({} as OpenClawConfig, "main");
|
const agentDir = resolveAgentDir({} as OpenClawConfig, "main");
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ afterEach(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("DEFAULT_AGENT_WORKSPACE_DIR", () => {
|
describe("DEFAULT_AGENT_WORKSPACE_DIR", () => {
|
||||||
it("uses OPENCLAW_HOME at module import time", async () => {
|
// Unix-style paths behave differently on Windows; skip there
|
||||||
|
it.skipIf(process.platform === "win32")("uses OPENCLAW_HOME at module import time", async () => {
|
||||||
vi.stubEnv("OPENCLAW_HOME", "/srv/openclaw-home");
|
vi.stubEnv("OPENCLAW_HOME", "/srv/openclaw-home");
|
||||||
vi.stubEnv("HOME", "/home/other");
|
vi.stubEnv("HOME", "/home/other");
|
||||||
vi.resetModules();
|
vi.resetModules();
|
||||||
|
|||||||
Reference in New Issue
Block a user