diff options
| author | Jacob Richman <[email protected]> | 2025-05-20 13:02:41 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-20 13:02:41 -0700 |
| commit | 716f7875a2fe4cec5433f64651a7f50cce58a41e (patch) | |
| tree | b440d482e12bc7efb55a9a813a7c4f6b67e3a117 /packages/server/src/tools/glob.test.ts | |
| parent | 4002e980d9e02e973e19226dbc25aeec00a65cf5 (diff) | |
Support Images and PDFs (#447)
Diffstat (limited to 'packages/server/src/tools/glob.test.ts')
| -rw-r--r-- | packages/server/src/tools/glob.test.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/server/src/tools/glob.test.ts b/packages/server/src/tools/glob.test.ts index 3437a66e..d42e5b1c 100644 --- a/packages/server/src/tools/glob.test.ts +++ b/packages/server/src/tools/glob.test.ts @@ -5,6 +5,7 @@ */ import { GlobTool, GlobToolParams } from './glob.js'; +import { partListUnionToString } from '../core/geminiRequest.js'; // import { ToolResult } from './tools.js'; // ToolResult is implicitly used by execute import path from 'path'; import fs from 'fs/promises'; @@ -134,9 +135,14 @@ describe('GlobTool', () => { it('should correctly sort files by modification time (newest first)', async () => { const params: GlobToolParams = { pattern: '*.sortme' }; const result = await globTool.execute(params, abortSignal); - expect(result.llmContent).toContain('Found 2 file(s)'); - const filesListed = result.llmContent - .substring(result.llmContent.indexOf(':') + 1) + const llmContent = partListUnionToString(result.llmContent); + + expect(llmContent).toContain('Found 2 file(s)'); + // Ensure llmContent is a string for TypeScript type checking + expect(typeof llmContent).toBe('string'); + + const filesListed = llmContent + .substring(llmContent.indexOf(':') + 1) .trim() .split('\n'); expect(filesListed[0]).toContain(path.join(tempRootDir, 'newer.sortme')); |
