summaryrefslogtreecommitdiff
path: root/packages/core/src/tools/modifiable-tool.test.ts
diff options
context:
space:
mode:
authorGal Zahavi <[email protected]>2025-08-05 14:55:54 -0700
committerGitHub <[email protected]>2025-08-05 21:55:54 +0000
commitaacae1de43a202e35ea88ed3ae5829586711f06f (patch)
tree621c7452f9995818720f224f0a9e9b76579782b7 /packages/core/src/tools/modifiable-tool.test.ts
parent8d993156e74b3b57edfd120547beb7ba052b0053 (diff)
fix(core): prevent UI shift after vim edit (#5315)
Diffstat (limited to 'packages/core/src/tools/modifiable-tool.test.ts')
-rw-r--r--packages/core/src/tools/modifiable-tool.test.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/core/src/tools/modifiable-tool.test.ts b/packages/core/src/tools/modifiable-tool.test.ts
index 47cf41fe..eb7e8dbf 100644
--- a/packages/core/src/tools/modifiable-tool.test.ts
+++ b/packages/core/src/tools/modifiable-tool.test.ts
@@ -94,6 +94,7 @@ describe('modifyWithEditor', () => {
mockModifyContext,
'vscode' as EditorType,
abortSignal,
+ vi.fn(),
);
expect(mockModifyContext.getCurrentContent).toHaveBeenCalledWith(
@@ -148,6 +149,7 @@ describe('modifyWithEditor', () => {
mockModifyContext,
'vscode' as EditorType,
abortSignal,
+ vi.fn(),
);
const stats = await fsp.stat(diffDir);
@@ -165,6 +167,7 @@ describe('modifyWithEditor', () => {
mockModifyContext,
'vscode' as EditorType,
abortSignal,
+ vi.fn(),
);
expect(mkdirSpy).not.toHaveBeenCalled();
@@ -183,6 +186,7 @@ describe('modifyWithEditor', () => {
mockModifyContext,
'vscode' as EditorType,
abortSignal,
+ vi.fn(),
);
expect(mockCreatePatch).toHaveBeenCalledWith(
@@ -211,6 +215,7 @@ describe('modifyWithEditor', () => {
mockModifyContext,
'vscode' as EditorType,
abortSignal,
+ vi.fn(),
);
expect(mockCreatePatch).toHaveBeenCalledWith(
@@ -241,6 +246,7 @@ describe('modifyWithEditor', () => {
mockModifyContext,
'vscode' as EditorType,
abortSignal,
+ vi.fn(),
),
).rejects.toThrow('Editor failed to open');
@@ -267,6 +273,7 @@ describe('modifyWithEditor', () => {
mockModifyContext,
'vscode' as EditorType,
abortSignal,
+ vi.fn(),
);
expect(consoleErrorSpy).toHaveBeenCalledTimes(2);
@@ -290,6 +297,7 @@ describe('modifyWithEditor', () => {
mockModifyContext,
'vscode' as EditorType,
abortSignal,
+ vi.fn(),
);
expect(mockOpenDiff).toHaveBeenCalledOnce();
@@ -311,6 +319,7 @@ describe('modifyWithEditor', () => {
mockModifyContext,
'vscode' as EditorType,
abortSignal,
+ vi.fn(),
);
expect(mockOpenDiff).toHaveBeenCalledOnce();