bug: Fix modify edit (#1078)

This commit is contained in:
Leo
2025-06-16 02:00:41 +01:00
committed by GitHub
parent 4463671284
commit 5c8e49a0e3
4 changed files with 9 additions and 1 deletions

View File

@@ -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',
});