import { describe, expect, it } from 'vitest'; import { TextLlmTool } from '../../../src/core/llm/TextLlmTool'; import type { RunContext } from '../../../src/core/llm/RunContext'; class EchoTool extends TextLlmTool> { protected readonly promptName = 'echo'; protected buildVariables(): Record { return {}; } } describe('TextLlmTool.parseOutput (via subclass)', () => { it('trims the raw LLM text and returns it as-is', () => { const tool = new EchoTool( {} as unknown as ConstructorParameters[0], {} as unknown as ConstructorParameters[1] ) as unknown as { parseOutput(raw: string, ctx: RunContext): string }; expect(tool.parseOutput(' hello world \n', {} as RunContext)).toBe('hello world'); }); });