Merge pull request #2770 from code-yeongyu/fix/ci-test-timeout

fix: add fetch mock to install test to prevent CI timeout
This commit is contained in:
YeonGyu-Kim
2026-03-24 03:29:23 +09:00
committed by GitHub

View File

@@ -53,6 +53,14 @@ describe("install CLI - binary check behavior", () => {
isOpenCodeInstalledSpy = spyOn(configManager, "isOpenCodeInstalled").mockResolvedValue(false)
getOpenCodeVersionSpy = spyOn(configManager, "getOpenCodeVersion").mockResolvedValue(null)
// given mock npm fetch
globalThis.fetch = mock(() =>
Promise.resolve({
ok: true,
json: () => Promise.resolve({ latest: "3.0.0" }),
} as Response)
) as unknown as typeof fetch
const args: InstallArgs = {
tui: false,
claude: "yes",