fix(test): wait for async skill description refresh

This commit is contained in:
GeonWoo Jeon (Jay)
2026-04-09 12:09:09 +09:00
parent 49d29c5565
commit e5189f2164
@@ -19,13 +19,15 @@ function createMockSkill(name: string): LoadedSkill {
} }
async function waitForRefresh(predicate: () => boolean): Promise<void> { async function waitForRefresh(predicate: () => boolean): Promise<void> {
for (let attempt = 0; attempt < 20; attempt += 1) { for (let attempt = 0; attempt < 200; attempt += 1) {
if (predicate()) { if (predicate()) {
return return
} }
await new Promise<void>((resolve) => setTimeout(resolve, 0)) await new Promise<void>((resolve) => setTimeout(resolve, 10))
} }
throw new Error("Timed out waiting for async skill description refresh")
} }
describe("skill tool - async native skill description refresh", () => { describe("skill tool - async native skill description refresh", () => {