chore: checkpoint browser tooling and routing updates

This commit is contained in:
William Valentin
2026-02-17 15:18:37 -08:00
parent 0a4cfda787
commit 9a2f1e2bb2
15 changed files with 499 additions and 67 deletions
+9 -1
View File
@@ -55,7 +55,8 @@ describe('Browser tools', () => {
expect(names).toContain('browser.type');
expect(names).toContain('browser.content');
expect(names).toContain('browser.eval');
expect(names).toHaveLength(6);
expect(names).toContain('browser.evaluate');
expect(names).toHaveLength(7);
});
it('browser.navigate navigates to URL', async () => {
@@ -147,6 +148,13 @@ describe('Browser tools', () => {
expect(result.output).toBe('hello world');
});
it('browser.evaluate aliases browser.eval behavior', async () => {
const tool = getTool('browser.evaluate');
const result = await tool.execute({ expression: '1 + 1' });
expect(result.success).toBe(true);
expect(result.output).toContain('42');
});
it('handles navigation errors gracefully', async () => {
mockGoto.mockRejectedValueOnce(new Error('Navigation failed'));
const tool = getTool('browser.navigate');