mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 19:47:28 +00:00
test(subagents): use lightweight clears in sessions spawn suites
This commit is contained in:
@@ -49,7 +49,7 @@ describe("sessions tools", () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
callGatewayMock.mockReset();
|
||||
callGatewayMock.mockClear();
|
||||
});
|
||||
|
||||
it("uses number (not integer) in tool schemas for Gemini compatibility", () => {
|
||||
|
||||
@@ -69,7 +69,7 @@ function seedDepthTwoAncestryStore(params?: { sessionIds?: boolean }) {
|
||||
describe("sessions_spawn depth + child limits", () => {
|
||||
beforeEach(() => {
|
||||
resetSubagentRegistryForTests();
|
||||
callGatewayMock.mockReset();
|
||||
callGatewayMock.mockClear();
|
||||
storeTemplatePath = path.join(
|
||||
os.tmpdir(),
|
||||
`openclaw-subagent-depth-${Date.now()}-${Math.random().toString(16).slice(2)}-{agentId}.json`,
|
||||
|
||||
@@ -76,7 +76,7 @@ describe("openclaw-tools: subagents (sessions_spawn allowlist)", () => {
|
||||
beforeEach(() => {
|
||||
resetSessionsSpawnConfigOverride();
|
||||
resetSubagentRegistryForTests();
|
||||
callGatewayMock.mockReset();
|
||||
callGatewayMock.mockClear();
|
||||
});
|
||||
|
||||
it("sessions_spawn only allows same-agent by default", async () => {
|
||||
|
||||
@@ -151,7 +151,7 @@ describe("openclaw-tools: subagents (sessions_spawn lifecycle)", () => {
|
||||
beforeEach(() => {
|
||||
resetSessionsSpawnConfigOverride();
|
||||
resetSubagentRegistryForTests();
|
||||
callGatewayMock.mockReset();
|
||||
callGatewayMock.mockClear();
|
||||
});
|
||||
|
||||
it("sessions_spawn runs cleanup flow after subagent completion", async () => {
|
||||
|
||||
@@ -100,7 +100,7 @@ describe("openclaw-tools: subagents (sessions_spawn model + thinking)", () => {
|
||||
beforeEach(() => {
|
||||
resetSessionsSpawnConfigOverride();
|
||||
resetSubagentRegistryForTests();
|
||||
callGatewayMock.mockReset();
|
||||
callGatewayMock.mockClear();
|
||||
});
|
||||
|
||||
it("sessions_spawn applies a model to the child session", async () => {
|
||||
|
||||
Reference in New Issue
Block a user