Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(human): wrap HumanPage test in MemoryRouter

Steven Enamakelcb764fc95c27
diff --git a/app/src/features/human/HumanPage.realtimeMode.test.tsx b/app/src/features/human/HumanPage.realtimeMode.test.tsx
index e411735c1d..62ce920ab1 100644
--- a/app/src/features/human/HumanPage.realtimeMode.test.tsx
+++ b/app/src/features/human/HumanPage.realtimeMode.test.tsx
@@ -11,6 +11,7 @@
import { configureStore } from '@reduxjs/toolkit';
import { render, screen } from '@testing-library/react';
import { Provider } from 'react-redux';
+import { MemoryRouter } from 'react-router-dom';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import chatRuntimeReducer from '../../store/chatRuntimeSlice';
@@ -75,9 +76,13 @@ async function renderPage() {
const store = configureStore({
reducer: { mascot: mascotReducer, thread: threadReducer, chatRuntime: chatRuntimeReducer },
});
+ // HumanPage routes (the composer's idle action opens /human, and the page
+ // navigates back), so it needs a router in scope.
return render(
<Provider store={store}>
- <HumanPage />
+ <MemoryRouter initialEntries={['/human']}>
+ <HumanPage />
+ </MemoryRouter>
</Provider>
);
}