test(windows): stabilize native coverage

This commit is contained in:
Tianyi Cui
2026-08-09 02:29:09 +08:00
parent 1ce84853de
commit 94799abfb0
10 changed files with 54 additions and 17 deletions

View File

@@ -416,7 +416,7 @@ describe('dsh-agent-spine-demo bundle', () => {
await ctx.fiber.dispose()
})
it('snapshots a created project skill through catalog refresh and progressive loading', async () => {
it('snapshots a created project skill through catalog refresh and progressive loading', { timeout: 15_000 }, async () => {
const root = await mkdtemp(join(tmpdir(), 'dsh-agent-spine-demo-skill-refresh-'))
const home = await mkdtemp(join(tmpdir(), 'dsh-agent-spine-demo-skill-refresh-home-'))
try {
@@ -449,6 +449,15 @@ describe('dsh-agent-spine-demo bundle', () => {
await ctx.plugin(LocalBashExecutor, {})
await ctx.plugin(LocalFileSystem, { cwd: root })
await ctx.plugin(ToolFs)
ctx.on('tools/post-execute', async (exec, _result, next) => {
const decision = await next()
if (exec.callId === 'write-skill') {
await vi.waitFor(async () => {
expect((await ctx.skills.list({ cwd: root })).map(skill => skill.name)).toContain('hot-skill')
}, { timeout: 5_000 })
}
return decision
})
ctx.llm.registerAdapter(['mock'], adapter)
const handle = await ctx.agents.create({
sessionId: SessionId('skill-refresh-session'),