From fc8921c51282e29c589fb93f367f1170ccb415ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Thu, 6 Aug 2026 13:27:46 +0200 Subject: [PATCH] Fix resizeTerminal success test: stub a successful fetch response --- .../Tabs/CloudShellTab/Data/CloudShellClient.test.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Explorer/Tabs/CloudShellTab/Data/CloudShellClient.test.tsx b/src/Explorer/Tabs/CloudShellTab/Data/CloudShellClient.test.tsx index 3cd066a9a..0a38e4aee 100644 --- a/src/Explorer/Tabs/CloudShellTab/Data/CloudShellClient.test.tsx +++ b/src/Explorer/Tabs/CloudShellTab/Data/CloudShellClient.test.tsx @@ -348,6 +348,16 @@ describe("CloudShellClient", () => { const terminalId = "terminal-id"; const size = { rows: 40, cols: 120 }; + global.fetch = jest.fn().mockImplementationOnce(() => { + return { + ok: true, + status: 200, + json: jest.fn().mockResolvedValue({}), + text: jest.fn().mockResolvedValue(""), + headers: new Headers(), + } as unknown as Promise; + }); + await resizeTerminal(consoleUri, terminalId, size); expect(global.fetch).toHaveBeenCalledWith(