mirror of
https://github.com/FJurmanovic/sugarr.git
synced 2026-11-10 23:31:08 +00:00
16 lines
804 B
TypeScript
16 lines
804 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { MovieSearchTool } from '../../../src/app/tools/MovieSearchTool';
|
|
import type { RunContext } from '../../../src/core/llm/RunContext';
|
|
|
|
describe('MovieSearchTool.buildVariables', () => {
|
|
it('passes the query and requested count through as prompt variables', () => {
|
|
const tool = new MovieSearchTool(
|
|
{} as unknown as ConstructorParameters<typeof MovieSearchTool>[0],
|
|
{} as unknown as ConstructorParameters<typeof MovieSearchTool>[1]
|
|
) as unknown as { buildVariables(input: unknown, ctx: RunContext): Record<string, unknown> };
|
|
|
|
const variables = tool.buildVariables({ query: 'sci-fi like Blade Runner', count: 5 }, {} as RunContext);
|
|
expect(variables).toEqual({ query: 'sci-fi like Blade Runner', count: 5 });
|
|
});
|
|
});
|