mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 09:08:38 +00:00
test: preload sandbox explain command module in suite
This commit is contained in:
@@ -10,6 +10,8 @@ vi.mock("../config/config.js", async (importOriginal) => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { sandboxExplainCommand } = await import("./sandbox-explain.js");
|
||||||
|
|
||||||
describe("sandbox explain command", () => {
|
describe("sandbox explain command", () => {
|
||||||
it("prints JSON shape + fix-it keys", async () => {
|
it("prints JSON shape + fix-it keys", async () => {
|
||||||
mockCfg = {
|
mockCfg = {
|
||||||
@@ -25,8 +27,6 @@ describe("sandbox explain command", () => {
|
|||||||
session: { store: "/tmp/openclaw-test-sessions-{agentId}.json" },
|
session: { store: "/tmp/openclaw-test-sessions-{agentId}.json" },
|
||||||
};
|
};
|
||||||
|
|
||||||
const { sandboxExplainCommand } = await import("./sandbox-explain.js");
|
|
||||||
|
|
||||||
const logs: string[] = [];
|
const logs: string[] = [];
|
||||||
await sandboxExplainCommand({ json: true, session: "agent:main:main" }, {
|
await sandboxExplainCommand({ json: true, session: "agent:main:main" }, {
|
||||||
log: (msg: string) => logs.push(msg),
|
log: (msg: string) => logs.push(msg),
|
||||||
|
|||||||
Reference in New Issue
Block a user