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: mock peerPullAuthorization in brain.test.js for hermetic route testing

[._.]/ Adam Eivy08fb148ee014
diff --git a/server/routes/brain.test.js b/server/routes/brain.test.js
index 04d6392721..38fc83c6d5 100644
--- a/server/routes/brain.test.js
+++ b/server/routes/brain.test.js
@@ -131,6 +131,11 @@ vi.mock('../services/brainReconcile.js', () => ({
getBrainSnapshot: vi.fn()
}));
+// Route tests stay hermetic against host-local federation settings (#26e83f71)
+vi.mock('../services/sharing/peerPullAuthorization.js', () => ({
+ authorizePeerPull: vi.fn(async () => ({ allowed: true }))
+}));
+
// Mock the brain journal service
vi.mock('../services/brainJournal.js', () => ({
listJournals: vi.fn(),