()
| 6 | import type { ToolContext } from '../src/tools/base.js'; |
| 7 | |
| 8 | function makeCtx(): ToolContext { |
| 9 | return { |
| 10 | cwd: process.cwd(), |
| 11 | sessionId: 'test', |
| 12 | transaction: {} as any, |
| 13 | permissions: { check: () => ({ ok: true }) } as any, |
| 14 | askUser: async () => 'allow', |
| 15 | signal: new AbortController().signal, |
| 16 | emit: () => {}, |
| 17 | } as ToolContext; |
| 18 | } |
| 19 | |
| 20 | describe('DuckDuckGo HTML parser', () => { |
| 21 | // Synthetic but format-accurate fixture. Real DDG markup has more attributes; the |