test: add workspace configuration mock for terminal tests

Mock VSCode workspace configuration to handle PowerShell detection in terminal tests. This prevents TypeError when accessing getConfiguration() in TerminalProcess.run()

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
This commit is contained in:
Eric Wheeler 2025-03-11 21:03:07 -07:00
parent a25f1d949d
commit f29a5fa9a4

View file

@ -14,6 +14,11 @@ jest.mock("vscode", () => {
}
return {
workspace: {
getConfiguration: jest.fn().mockReturnValue({
get: jest.fn().mockReturnValue(null),
}),
},
window: {
createTerminal: jest.fn(),
onDidStartTerminalShellExecution: jest.fn().mockImplementation((handler) => {