test: clean subagent depth registry state

This commit is contained in:
Peter Steinberger
2026-04-18 22:47:59 +01:00
parent 4a5a43fb98
commit d9b05e601e

View File

@@ -1,7 +1,7 @@
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { createPerSenderSessionConfig } from "./test-helpers/session-config.js";
const callGatewayMock = vi.fn();
@@ -112,6 +112,11 @@ describe("sessions_spawn depth + child limits", () => {
});
});
afterEach(() => {
resetSubagentRegistryForTests({ persist: false });
subagentRegistryTesting.setDepsForTest();
});
afterAll(() => {
setSubagentSpawnDepsForTest();
});