summaryrefslogtreecommitdiff
path: root/packages/core/src/tools/edit.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/core/src/tools/edit.test.ts')
-rw-r--r--packages/core/src/tools/edit.test.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/core/src/tools/edit.test.ts b/packages/core/src/tools/edit.test.ts
index 08d0860d..e0de98d5 100644
--- a/packages/core/src/tools/edit.test.ts
+++ b/packages/core/src/tools/edit.test.ts
@@ -178,14 +178,14 @@ describe('EditTool', () => {
});
});
- describe('validateParams', () => {
+ describe('validateToolParams', () => {
it('should return null for valid params', () => {
const params: EditToolParams = {
file_path: path.join(rootDir, 'test.txt'),
old_string: 'old',
new_string: 'new',
};
- expect(tool.validateParams(params)).toBeNull();
+ expect(tool.validateToolParams(params)).toBeNull();
});
it('should return error for relative path', () => {
@@ -194,7 +194,9 @@ describe('EditTool', () => {
old_string: 'old',
new_string: 'new',
};
- expect(tool.validateParams(params)).toMatch(/File path must be absolute/);
+ expect(tool.validateToolParams(params)).toMatch(
+ /File path must be absolute/,
+ );
});
it('should return error for path outside root', () => {
@@ -203,7 +205,7 @@ describe('EditTool', () => {
old_string: 'old',
new_string: 'new',
};
- expect(tool.validateParams(params)).toMatch(
+ expect(tool.validateToolParams(params)).toMatch(
/File path must be within the root directory/,
);
});