Speed up targeted opencode tests
Reduce avoidable setup costs in slow opencode tests while preserving reviewed coverage and recording the benchmark evidence for follow-up test-suite work.
This commit is contained in:
@@ -249,7 +249,7 @@ it.live("session.processor effect tests capture llm input cleanly", () =>
|
||||
expect(calls).toBe(1)
|
||||
expect(parts.some((part) => part.type === "text" && part.text === "hello")).toBe(true)
|
||||
}),
|
||||
{ git: true, config: (url) => providerCfg(url) },
|
||||
{ config: (url) => providerCfg(url) },
|
||||
),
|
||||
)
|
||||
|
||||
@@ -331,7 +331,7 @@ it.live("session.processor effect tests preserve text start time", () =>
|
||||
if (!text?.time?.start || !text.time.end) return
|
||||
expect(text.time.start).toBeLessThan(text.time.end)
|
||||
}),
|
||||
{ git: true, config: (url) => providerCfg(url) },
|
||||
{ config: (url) => providerCfg(url) },
|
||||
),
|
||||
)
|
||||
|
||||
@@ -377,7 +377,7 @@ it.live("session.processor effect tests stop after token overflow requests compa
|
||||
expect(parts.some((part) => part.type === "text" && part.text === "after")).toBe(true)
|
||||
expect(parts.some((part) => part.type === "step-finish")).toBe(true)
|
||||
}),
|
||||
{ git: true, config: (url) => providerCfg(url) },
|
||||
{ config: (url) => providerCfg(url) },
|
||||
),
|
||||
)
|
||||
|
||||
@@ -425,7 +425,7 @@ it.live("session.processor effect tests capture reasoning from http mock", () =>
|
||||
expect(reasoning?.text).toBe("think")
|
||||
expect(text?.text).toBe("done")
|
||||
}),
|
||||
{ git: true, config: (url) => providerCfg(url) },
|
||||
{ config: (url) => providerCfg(url) },
|
||||
),
|
||||
)
|
||||
|
||||
@@ -472,7 +472,7 @@ it.live("session.processor effect tests reset reasoning state across retries", (
|
||||
expect(reasoning.some((part) => part.text === "two")).toBe(true)
|
||||
expect(reasoning.some((part) => part.text === "onetwo")).toBe(false)
|
||||
}),
|
||||
{ git: true, config: (url) => providerCfg(url) },
|
||||
{ config: (url) => providerCfg(url) },
|
||||
),
|
||||
)
|
||||
|
||||
@@ -515,7 +515,7 @@ it.live("session.processor effect tests do not retry unknown json errors", () =>
|
||||
expect(yield* llm.calls).toBe(1)
|
||||
expect(handle.message.error?.name).toBe("APIError")
|
||||
}),
|
||||
{ git: true, config: (url) => providerCfg(url) },
|
||||
{ config: (url) => providerCfg(url) },
|
||||
),
|
||||
)
|
||||
|
||||
@@ -562,7 +562,7 @@ it.live("session.processor effect tests retry recognized structured json errors"
|
||||
expect(parts.some((part) => part.type === "text" && part.text === "after")).toBe(true)
|
||||
expect(handle.message.error).toBeUndefined()
|
||||
}),
|
||||
{ git: true, config: (url) => providerCfg(url) },
|
||||
{ config: (url) => providerCfg(url) },
|
||||
),
|
||||
)
|
||||
|
||||
@@ -614,7 +614,7 @@ it.live("session.processor effect tests publish retry status updates", () =>
|
||||
expect(yield* llm.calls).toBe(2)
|
||||
expect(states).toStrictEqual([1])
|
||||
}),
|
||||
{ git: true, config: (url) => providerCfg(url) },
|
||||
{ config: (url) => providerCfg(url) },
|
||||
),
|
||||
)
|
||||
|
||||
@@ -657,7 +657,7 @@ it.live("session.processor effect tests compact on structured context overflow",
|
||||
expect(yield* llm.calls).toBe(1)
|
||||
expect(handle.message.error).toBeUndefined()
|
||||
}),
|
||||
{ git: true, config: (url) => providerCfg(url) },
|
||||
{ config: (url) => providerCfg(url) },
|
||||
),
|
||||
)
|
||||
|
||||
@@ -721,7 +721,7 @@ it.live("session.processor effect tests mark pending tools as aborted on cleanup
|
||||
expect(call.state.time.end).toBeDefined()
|
||||
}
|
||||
}),
|
||||
{ git: true, config: (url) => providerCfg(url) },
|
||||
{ config: (url) => providerCfg(url) },
|
||||
),
|
||||
)
|
||||
|
||||
@@ -793,7 +793,7 @@ it.live("session.processor effect tests record aborted errors and idle state", (
|
||||
expect(state).toMatchObject({ type: "idle" })
|
||||
expect(errs).toContain("MessageAbortedError")
|
||||
}),
|
||||
{ git: true, config: (url) => providerCfg(url) },
|
||||
{ config: (url) => providerCfg(url) },
|
||||
),
|
||||
)
|
||||
|
||||
@@ -850,6 +850,6 @@ it.live("session.processor effect tests mark interruptions aborted without manua
|
||||
}
|
||||
expect(state).toMatchObject({ type: "idle" })
|
||||
}),
|
||||
{ git: true, config: (url) => providerCfg(url) },
|
||||
{ config: (url) => providerCfg(url) },
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user