mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 23:08:28 +00:00
test: reclassify local helper suites out of agents e2e
This commit is contained in:
19
src/agents/workspace.defaults.test.ts
Normal file
19
src/agents/workspace.defaults.test.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import path from "node:path";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { resolveDefaultAgentWorkspaceDir } from "./workspace.js";
|
||||
|
||||
afterEach(() => {
|
||||
vi.unstubAllEnvs();
|
||||
});
|
||||
|
||||
describe("DEFAULT_AGENT_WORKSPACE_DIR", () => {
|
||||
it("uses OPENCLAW_HOME when resolving the default workspace dir", () => {
|
||||
const home = path.join(path.sep, "srv", "openclaw-home");
|
||||
vi.stubEnv("OPENCLAW_HOME", home);
|
||||
vi.stubEnv("HOME", path.join(path.sep, "home", "other"));
|
||||
|
||||
expect(resolveDefaultAgentWorkspaceDir()).toBe(
|
||||
path.join(path.resolve(home), ".openclaw", "workspace"),
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user