From 1919433df126c34e6a2dcc72c28b62586d245985 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Tue, 23 Jun 2026 15:50:41 +0800 Subject: [PATCH] =?UTF-8?q?test(ai-review):=20=E8=A3=9C=20judgeConversatio?= =?UTF-8?q?ns=20=E7=A9=BA=E9=99=A3=E5=88=97=E5=9B=9E=E6=87=89=E8=A6=96?= =?UTF-8?q?=E7=82=BA=20open=20=E7=9A=84=E9=82=8A=E7=95=8C=E6=B8=AC?= =?UTF-8?q?=E8=A9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/resolve.test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/resolve.test.js b/app/resolve.test.js index 2fbd7d2..1ce4c8d 100644 --- a/app/resolve.test.js +++ b/app/resolve.test.js @@ -120,6 +120,15 @@ describe('judgeConversations', () => { assert.deepEqual(verdicts, [{ idx: 0, verdict: 'open' }]); }); + it('treats an empty AI response array as all open (conservative)', async () => { + const items = [{ idx: 0 }, { idx: 1 }]; + const verdicts = await judgeConversations(items, async () => []); + assert.deepEqual(verdicts, [ + { idx: 0, verdict: 'open' }, + { idx: 1, verdict: 'open' }, + ]); + }); + it('ignores entries with unknown verdict or non-integer idx', async () => { const items = [{ idx: 0 }, { idx: 1 }]; const chatFn = async () => [