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:
@@ -53,6 +53,14 @@ describe("install CLI - binary check behavior", () => {
|
|||||||
isOpenCodeInstalledSpy = spyOn(configManager, "isOpenCodeInstalled").mockResolvedValue(false)
|
isOpenCodeInstalledSpy = spyOn(configManager, "isOpenCodeInstalled").mockResolvedValue(false)
|
||||||
getOpenCodeVersionSpy = spyOn(configManager, "getOpenCodeVersion").mockResolvedValue(null)
|
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 = {
|
const args: InstallArgs = {
|
||||||
tui: false,
|
tui: false,
|
||||||
claude: "yes",
|
claude: "yes",
|
||||||
|
|||||||
Reference in New Issue
Block a user