mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-02 18:17:14 +00:00
test: preserve config exports in agent handler mock
This commit is contained in:
@@ -43,9 +43,14 @@ vi.mock("../../commands/agent.js", () => ({
|
|||||||
agentCommand: mocks.agentCommand,
|
agentCommand: mocks.agentCommand,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
vi.mock("../../config/config.js", () => ({
|
vi.mock("../../config/config.js", async () => {
|
||||||
loadConfig: () => mocks.loadConfigReturn,
|
const actual =
|
||||||
}));
|
await vi.importActual<typeof import("../../config/config.js")>("../../config/config.js");
|
||||||
|
return {
|
||||||
|
...actual,
|
||||||
|
loadConfig: () => mocks.loadConfigReturn,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
vi.mock("../../agents/agent-scope.js", () => ({
|
vi.mock("../../agents/agent-scope.js", () => ({
|
||||||
listAgentIds: () => ["main"],
|
listAgentIds: () => ["main"],
|
||||||
|
|||||||
Reference in New Issue
Block a user