mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-27 11:56:43 +02:00
test(agents): trim subagent spawn config duplication
This commit is contained in:
@@ -7,24 +7,7 @@ import {
|
||||
|
||||
const hoisted = vi.hoisted(() => ({
|
||||
callGatewayMock: vi.fn(),
|
||||
configOverride: {
|
||||
session: { mainKey: "main", scope: "per-sender" },
|
||||
tools: {
|
||||
sessions_spawn: {
|
||||
attachments: {
|
||||
enabled: true,
|
||||
maxFiles: 50,
|
||||
maxFileBytes: 1 * 1024 * 1024,
|
||||
maxTotalBytes: 5 * 1024 * 1024,
|
||||
},
|
||||
},
|
||||
},
|
||||
agents: {
|
||||
defaults: {
|
||||
workspace: "/tmp",
|
||||
},
|
||||
},
|
||||
},
|
||||
configOverride: {} as Record<string, unknown>,
|
||||
}));
|
||||
|
||||
let resetSubagentRegistryForTests: typeof import("./subagent-registry.js").resetSubagentRegistryForTests;
|
||||
|
||||
@@ -8,24 +8,7 @@ type GatewayRequest = { method?: string; params?: Record<string, unknown> };
|
||||
|
||||
const hoisted = vi.hoisted(() => ({
|
||||
callGatewayMock: vi.fn(),
|
||||
configOverride: {
|
||||
session: { mainKey: "main", scope: "per-sender" },
|
||||
tools: {
|
||||
sessions_spawn: {
|
||||
attachments: {
|
||||
enabled: true,
|
||||
maxFiles: 50,
|
||||
maxFileBytes: 1 * 1024 * 1024,
|
||||
maxTotalBytes: 5 * 1024 * 1024,
|
||||
},
|
||||
},
|
||||
},
|
||||
agents: {
|
||||
defaults: {
|
||||
workspace: "/tmp",
|
||||
},
|
||||
},
|
||||
},
|
||||
configOverride: {} as Record<string, unknown>,
|
||||
}));
|
||||
|
||||
const hookRunnerMocks = vi.hoisted(() => ({
|
||||
|
||||
Reference in New Issue
Block a user