test(tools): 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:
YeonGyu-Kim
2026-05-12 14:23:05 +09:00
parent 8b093a1115
commit fb135d047c
24 changed files with 199 additions and 156 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ describe("LSPClient", () => {
const originalSetTimeout = globalThis.setTimeout
globalThis.setTimeout = ((fn: (...args: unknown[]) => void, _ms?: number) => {
fn()
return 0 as unknown as ReturnType<typeof setTimeout>
return testCoerce<ReturnType<typeof setTimeout>>(0)
}) as typeof setTimeout
const server: ResolvedServer = {
@@ -50,7 +50,7 @@ describe("LSPClient", () => {
// Stub protocol output: we only want to assert notifications.
const sendNotificationSpy = spyOn(
client as unknown as { sendNotification: (m: string, p?: unknown) => void },
testCoerce<{ sendNotification: (m: string, p?: unknown) => void }>(client),
"sendNotification"
)