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

fix: restore global.fetch instead of deleting it in digital-twin test

Adam Eivyfb75a3812ab8
diff --git a/server/services/digital-twin.test.js b/server/services/digital-twin.test.js
index 76f0ae0117..d2a59ed651 100644
--- a/server/services/digital-twin.test.js
+++ b/server/services/digital-twin.test.js
@@ -1228,6 +1228,7 @@ Should mention core values.
buildPrompt.mockResolvedValue(null); // Force fallback prompt
// Mock fetch for callProviderAI
+ const originalFetch = global.fetch;
global.fetch = vi.fn().mockResolvedValue({
ok: true,
json: async () => ({
@@ -1244,7 +1245,7 @@ Should mention core values.
expect(result.source).toBe('goodreads');
expect(result.itemCount).toBe(2);
- delete global.fetch;
+ global.fetch = originalFetch;
});
});