test(agents): isolate shared subagent state

This commit is contained in:
Peter Steinberger
2026-04-14 22:48:56 +01:00
parent e7dfc88bfa
commit 54cf4cd857
9 changed files with 128 additions and 49 deletions

View File

@@ -4,6 +4,7 @@ export function createAgentsVitestConfig(env?: Record<string, string | undefined
return createScopedVitestConfig(["src/agents/**/*.test.ts"], {
dir: "src/agents",
env,
fileParallelism: false,
name: "agents",
});
}

View File

@@ -141,6 +141,7 @@ export function createScopedVitestConfig(
includeOpenClawRuntimeSetup?: boolean;
isolate?: boolean;
name?: string;
fileParallelism?: boolean;
pool?: "forks" | "threads";
passWithNoTests?: boolean;
setupFiles?: string[];
@@ -184,6 +185,9 @@ export function createScopedVitestConfig(
include: relativizeScopedPatterns(includeFromEnv ?? cliInclude ?? include, scopedDir),
exclude,
...(options?.pool ? { pool: options.pool } : {}),
...(options?.fileParallelism === undefined
? {}
: { fileParallelism: options.fileParallelism }),
...(scopedGroupOrder === undefined
? {}
: {