test(tasks): close flow registry before temp-dir cleanup

This commit is contained in:
luoyanglang
2026-04-03 00:58:50 +08:00
committed by Peter Steinberger
parent 68d8e15a2e
commit f0a4bbba33

View File

@@ -173,6 +173,7 @@ async function withTaskRegistryTempDir<T>(run: (root: string) => Promise<T>): Pr
return await withTempDir({ prefix: "openclaw-task-registry-" }, async (root) => {
process.env.OPENCLAW_STATE_DIR = root;
resetTaskRegistryForTests();
resetTaskFlowRegistryForTests();
try {
return await run(root);
} finally {