Skip to content

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

test(memory): cover unknown brain query fallback

Steven Enamakel92c16029e464
diff --git a/app/src/pages/__tests__/Memory.test.tsx b/app/src/pages/__tests__/Memory.test.tsx
index cc7214ea84..e0f47d29b8 100644
--- a/app/src/pages/__tests__/Memory.test.tsx
+++ b/app/src/pages/__tests__/Memory.test.tsx
@@ -170,6 +170,15 @@ describe('Memory page', () => {
expect(screen.getByTestId('where').textContent).not.toContain('view=');
});
+ it('rewrites an unknown ?brain= value to the Engine chip', async () => {
+ renderAt('?tab=brain&brain=bogus');
+ expect(await screen.findByTestId('stub-engine')).toBeInTheDocument();
+ await waitFor(() =>
+ expect(screen.getByTestId('where')).toHaveTextContent('?tab=brain&brain=engine')
+ );
+ expect(screen.getByTestId('where').textContent).not.toContain('bogus');
+ });
+
it('switches chips through the URL', async () => {
renderAt('?tab=brain&brain=ask');
await screen.findByTestId('stub-ask');