Просмотр исходного кода

fix: add workspace configuration mock to TerminalProcess test

Add VSCode workspace configuration mock to TerminalProcess.test.ts to handle PowerShell detection in terminal tests, matching the fix in TerminalProcessExec.test.ts

Signed-off-by: Eric Wheeler <[email protected]>
Eric Wheeler 9 месяцев назад
Родитель
Сommit
50b7326aa0
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      src/integrations/terminal/__tests__/TerminalProcess.test.ts

+ 5 - 0
src/integrations/terminal/__tests__/TerminalProcess.test.ts

@@ -10,6 +10,11 @@ import { TerminalRegistry } from "../TerminalRegistry"
 const mockCreateTerminal = jest.fn()
 
 jest.mock("vscode", () => ({
+	workspace: {
+		getConfiguration: jest.fn().mockReturnValue({
+			get: jest.fn().mockReturnValue(null),
+		}),
+	},
 	window: {
 		createTerminal: (...args: any[]) => {
 			mockCreateTerminal(...args)