Skip to content

Commit f0c2d64

Browse files
authored
Tighten shell path assertion
Assert the exact mocked PowerShell path instead of matching only the executable name.
1 parent 534e9ef commit f0c2d64

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/integrations/terminal/__tests__/ExecaTerminalProcess.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ describe("ExecaTerminalProcess", () => {
221221
const getShellSpy = vi.spyOn(shellUtils, "getShell").mockReturnValue("C:\\Windows\\System32\\pwsh.exe")
222222
await terminalProcess.run("echo test")
223223
expect(getShellSpy).toHaveBeenCalledTimes(1)
224-
expect(capturedShellOption().shell).toContain("pwsh.exe")
224+
expect(capturedShellOption().shell).toBe("C:\\Windows\\System32\\pwsh.exe")
225225
})
226226

227227
it("uses PowerShell when VS Code resolves PowerShell and execaShellPath is unset", async () => {

0 commit comments

Comments
 (0)