mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05: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");
|
||||
});
|
||||
|
||||
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");
|
||||
|
||||
const workspace = resolveAgentWorkspaceDir({} as OpenClawConfig, "main");
|
||||
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");
|
||||
|
||||
const agentDir = resolveAgentDir({} as OpenClawConfig, "main");
|
||||
|
||||
@@ -6,7 +6,8 @@ afterEach(() => {
|
||||
});
|
||||
|
||||
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("HOME", "/home/other");
|
||||
vi.resetModules();
|
||||
|
||||
Reference in New Issue
Block a user