test(cli): remove unsafe test assertions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -57,12 +57,12 @@ describe("install CLI - binary check behavior", () => {
|
||||
getOpenCodeVersionSpy = spyOn(configManager, "getOpenCodeVersion").mockResolvedValue(null)
|
||||
|
||||
// given mock npm fetch
|
||||
globalThis.fetch = mock(() =>
|
||||
globalThis.fetch = testCoerce<typeof 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,
|
||||
@@ -92,12 +92,12 @@ describe("install CLI - binary check behavior", () => {
|
||||
getOpenCodeVersionSpy = spyOn(configManager, "getOpenCodeVersion").mockResolvedValue(null)
|
||||
|
||||
// given mock npm fetch
|
||||
globalThis.fetch = mock(() =>
|
||||
globalThis.fetch = testCoerce<typeof 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,
|
||||
@@ -131,12 +131,12 @@ describe("install CLI - binary check behavior", () => {
|
||||
getOpenCodeVersionSpy = spyOn(configManager, "getOpenCodeVersion").mockResolvedValue("1.4.0")
|
||||
|
||||
// given mock npm fetch
|
||||
globalThis.fetch = mock(() =>
|
||||
globalThis.fetch = testCoerce<typeof 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,
|
||||
|
||||
Reference in New Issue
Block a user