mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-26 16:06:16 +00:00
test: harden threaded shared-worker suites
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { cleanupSessionStateForTest } from "../../src/test-utils/session-state-cleanup.js";
|
||||
|
||||
type EnvValue = string | undefined | ((home: string) => string | undefined);
|
||||
|
||||
@@ -129,6 +130,7 @@ export async function withTempHome<T>(
|
||||
try {
|
||||
return await fn(base);
|
||||
} finally {
|
||||
await cleanupSessionStateForTest().catch(() => undefined);
|
||||
restoreExtraEnv(envSnapshot);
|
||||
restoreEnv(snapshot);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user