Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

test: initialize orchestrator filesystem mock before imports

atomantic44b3f5cf2507
diff --git a/server/services/creativeDirector/orchestrator.test.js b/server/services/creativeDirector/orchestrator.test.js
index 3f060148a9..d8230c6947 100644
--- a/server/services/creativeDirector/orchestrator.test.js
+++ b/server/services/creativeDirector/orchestrator.test.js
@@ -13,7 +13,8 @@ const mockSampleEvaluationFrames = vi.fn(async () => []);
// frames deleted under us, and (b) the rendered .mp4 itself to differentiate
// "video deleted while paused" (fail scene) from "transient ffmpeg failure"
// (bail and retry). Tests override per-call with mockReturnValueOnce.
-const mockExistsSync = vi.fn(() => false);
+// Data-root resolution may call existsSync during static imports.
+const { mockExistsSync } = vi.hoisted(() => ({ mockExistsSync: vi.fn(() => false) }));
vi.mock('./local.js', () => ({
getProject: vi.fn(),