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", () => {
|
||||
it("prints JSON shape + fix-it keys", async () => {
|
||||
mockCfg = {
|
||||
@@ -25,8 +27,6 @@ describe("sandbox explain command", () => {
|
||||
session: { store: "/tmp/openclaw-test-sessions-{agentId}.json" },
|
||||
};
|
||||
|
||||
const { sandboxExplainCommand } = await import("./sandbox-explain.js");
|
||||
|
||||
const logs: string[] = [];
|
||||
await sandboxExplainCommand({ json: true, session: "agent:main:main" }, {
|
||||
log: (msg: string) => logs.push(msg),
|
||||
|
||||
Reference in New Issue
Block a user