diff options
| author | Tommaso Sciortino <[email protected]> | 2025-07-07 23:48:44 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-08 06:48:44 +0000 |
| commit | 4dab31f1c8f0f4025c5d6a81c1b64f711e066756 (patch) | |
| tree | 3db882e191862e4c24e5653167a756145b567759 /packages/core/src/tools/read-many-files.test.ts | |
| parent | 137ffec3f6fe035b7edcb478e6c44e66fa593839 (diff) | |
Improve Function Call argument validation and typing (#2881)
Co-authored-by: N. Taylor Mullen <[email protected]>
Diffstat (limited to 'packages/core/src/tools/read-many-files.test.ts')
| -rw-r--r-- | packages/core/src/tools/read-many-files.test.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/core/src/tools/read-many-files.test.ts b/packages/core/src/tools/read-many-files.test.ts index 697b7d1b..ef42d8b6 100644 --- a/packages/core/src/tools/read-many-files.test.ts +++ b/packages/core/src/tools/read-many-files.test.ts @@ -138,7 +138,7 @@ describe('ReadManyFilesTool', () => { it('should return error if paths array is empty', () => { const params = { paths: [] }; expect(tool.validateParams(params)).toBe( - 'The "paths" parameter is required and must be a non-empty array of strings/glob patterns.', + 'params/paths must NOT have fewer than 1 items', ); }); @@ -154,7 +154,7 @@ describe('ReadManyFilesTool', () => { it('should return error if paths array contains an empty string', () => { const params = { paths: ['file1.txt', ''] }; expect(tool.validateParams(params)).toBe( - 'Each item in "paths" must be a non-empty string/glob pattern.', + 'params/paths/1 must NOT have fewer than 1 characters', ); }); @@ -164,7 +164,7 @@ describe('ReadManyFilesTool', () => { include: ['*.ts', 123] as string[], }; expect(tool.validateParams(params)).toBe( - 'If provided, "include" must be an array of strings/glob patterns.', + 'params/include/1 must be string', ); }); @@ -174,7 +174,7 @@ describe('ReadManyFilesTool', () => { exclude: ['*.log', {}] as string[], }; expect(tool.validateParams(params)).toBe( - 'If provided, "exclude" must be an array of strings/glob patterns.', + 'params/exclude/1 must be string', ); }); }); |
