diff options
| author | joshualitt <[email protected]> | 2025-08-19 13:55:06 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-19 20:55:06 +0000 |
| commit | b9cece767d1abccd06fb95cab759afd06cc2c1e1 (patch) | |
| tree | 8c29a49bbaedd0a706bd2dba82eb4c587797ba7e /packages/core/src/tools/read-file.test.ts | |
| parent | 2143731f6efdf1aafff38ec249caf01a8bcd163e (diff) | |
feat(core): Cleanup after migrating tools. (#6199)
Co-authored-by: Jacob Richman <[email protected]>
Diffstat (limited to 'packages/core/src/tools/read-file.test.ts')
| -rw-r--r-- | packages/core/src/tools/read-file.test.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/core/src/tools/read-file.test.ts b/packages/core/src/tools/read-file.test.ts index b7b323cf..82958184 100644 --- a/packages/core/src/tools/read-file.test.ts +++ b/packages/core/src/tools/read-file.test.ts @@ -71,6 +71,15 @@ describe('ReadFileTool', () => { ); }); + it('should throw error if path is empty', () => { + const params: ReadFileToolParams = { + absolute_path: '', + }; + expect(() => tool.build(params)).toThrow( + /The 'absolute_path' parameter must be non-empty./, + ); + }); + it('should throw error if offset is negative', () => { const params: ReadFileToolParams = { absolute_path: path.join(tempRootDir, 'test.txt'), |
