From 3a0d6402140efb37bdfd86fd9b2f94333335313a Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Sat, 19 Sep 2026 21:19:46 +0800 Subject: [PATCH] test(llm): show malformed Files payloads in case names Interpolating an empty body directly produces empty parentheses in the failure title, making the empty-response case harder to distinguish from the truncated JSON case in CI logs. Use JSON formatting for the existing case object so the operation and body are visible, including an explicit empty string. Keep the same inputs, error classification, original-cause assertions, and single-request checks. --- packages/llm/llm-deepseek/tests/files-api.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/llm/llm-deepseek/tests/files-api.spec.ts b/packages/llm/llm-deepseek/tests/files-api.spec.ts index 6b4b3ff6f3..a23664c85c 100644 --- a/packages/llm/llm-deepseek/tests/files-api.spec.ts +++ b/packages/llm/llm-deepseek/tests/files-api.spec.ts @@ -36,7 +36,7 @@ describe('DeepSeekFilesClient', () => { describe.each(['messages', 'chat-completions'] as const)('%s successful response JSON', (protocol) => { it.each((['upload', 'list', 'retrieve', 'delete'] as const).flatMap(operation => ['', '{"id":'].map(body => ({ operation, body })), - ))('rejects malformed $operation JSON with the operation and HTTP status ($body)', async ({ operation, body }) => { + ))('rejects malformed JSON with operation and HTTP status: %j', async ({ operation, body }) => { const fetchImpl = vi.fn(async () => new Response(body, { status: 200 })) const client = new DeepSeekFilesClient({ protocol, baseURL: 'https://files.example', apiKey: 'test-key', fetch: fetchImpl }) const operations = {