fix: address dsh badge review feedback

This commit is contained in:
Turtle
2026-08-06 18:54:53 +08:00
parent 928c99876e
commit 4dede454ed
18 changed files with 48 additions and 35 deletions

View File

@@ -34,6 +34,7 @@ describe('dsh badge assembled snapshot', () => {
expect(enabled.stderr).toBe('')
expect(disabledSnapshot).toMatchInlineSnapshot(`
{
"catalog": null,
"result": {
"content": [
{
@@ -46,6 +47,7 @@ describe('dsh badge assembled snapshot', () => {
},
"isError": true,
},
"summary": null,
}
`)
expect(enabledSnapshot).toMatchInlineSnapshot(`
@@ -169,5 +171,5 @@ describe('dsh badge assembled snapshot', () => {
},
}
`)
}, LOADER_SMOKE_TEST_TIMEOUT_MS)
}, LOADER_SMOKE_TEST_TIMEOUT_MS * 2)
})

View File

@@ -47,7 +47,7 @@ try {
arguments: { name: 'dsh-badge' },
signal: new AbortController().signal,
})
process.stdout.write(`${JSON.stringify({ catalog, summary, result })}\n`)
process.stdout.write(`${JSON.stringify({ catalog: catalog ?? null, summary: summary ?? null, result })}\n`)
} finally {
await ctx.fiber.dispose()
}