mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix: Correct pluralization of the number of occurrences in EditTool tool errors (#2463)
This commit is contained in:
@@ -486,10 +486,10 @@ describe('EditTool', () => {
|
||||
// The default mockEnsureCorrectEdit will return 2 occurrences for 'old'
|
||||
const result = await tool.execute(params, new AbortController().signal);
|
||||
expect(result.llmContent).toMatch(
|
||||
/Expected 1 occurrences but found 2 for old_string in file/,
|
||||
/Expected 1 occurrence but found 2 for old_string in file/,
|
||||
);
|
||||
expect(result.returnDisplay).toMatch(
|
||||
/Failed to edit, expected 1 occurrence\(s\) but found 2/,
|
||||
/Failed to edit, expected 1 occurrence but found 2/,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -532,7 +532,7 @@ describe('EditTool', () => {
|
||||
/Expected 3 occurrences but found 2 for old_string in file/,
|
||||
);
|
||||
expect(result.returnDisplay).toMatch(
|
||||
/Failed to edit, expected 3 occurrence\(s\) but found 2/,
|
||||
/Failed to edit, expected 3 occurrences but found 2/,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user