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: await socket subscription emit in DataManager tombstone-GC test (#8137)

[._.]/ Adam Eivy53b2973c1396
diff --git a/client/src/pages/DataManager.test.jsx b/client/src/pages/DataManager.test.jsx
index 2b30a60dba..09ff9b436e 100644
--- a/client/src/pages/DataManager.test.jsx
+++ b/client/src/pages/DataManager.test.jsx
@@ -56,7 +56,7 @@ describe('DataManager tombstone GC peer-refusal subscription (#8110)', () => {
it('subscribes to the instances room on mount', async () => {
render(<DataManager />);
await waitFor(() => expect(screen.getByText(UNKNOWN_DESCRIPTION)).toBeInTheDocument());
- expect(socket.emit).toHaveBeenCalledWith('instances:subscribe');
+ await waitFor(() => expect(socket.emit).toHaveBeenCalledWith('instances:subscribe'));
});
it('re-subscribes and refetches refusal status after a socket reconnect', async () => {
@@ -69,7 +69,7 @@ describe('DataManager tombstone GC peer-refusal subscription (#8110)', () => {
socket.emit.mockClear();
await act(async () => connectHandler());
- expect(socket.emit).toHaveBeenCalledWith('instances:subscribe');
+ await waitFor(() => expect(socket.emit).toHaveBeenCalledWith('instances:subscribe'));
await waitFor(() => expect(getTombstoneSweepStatus.mock.calls.length).toBeGreaterThan(initialCalls));
});
});