mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
bug: Fix modify edit (#1078)
This commit is contained in:
@@ -74,9 +74,10 @@ describe('modifyWithEditor', () => {
|
||||
getProposedContent: vi.fn().mockResolvedValue(proposedContent),
|
||||
createUpdatedParams: vi
|
||||
.fn()
|
||||
.mockImplementation((modifiedContent, originalParams) => ({
|
||||
.mockImplementation((oldContent, modifiedContent, originalParams) => ({
|
||||
...originalParams,
|
||||
modifiedContent,
|
||||
oldContent,
|
||||
})),
|
||||
};
|
||||
|
||||
@@ -153,6 +154,7 @@ describe('modifyWithEditor', () => {
|
||||
);
|
||||
|
||||
expect(mockModifyContext.createUpdatedParams).toHaveBeenCalledWith(
|
||||
currentContent,
|
||||
modifiedContent,
|
||||
mockParams,
|
||||
);
|
||||
@@ -183,6 +185,7 @@ describe('modifyWithEditor', () => {
|
||||
updatedParams: {
|
||||
...mockParams,
|
||||
modifiedContent,
|
||||
oldContent: currentContent,
|
||||
},
|
||||
updatedDiff: 'mock diff content',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user