fix: handle malformed document lists in preparation overview

This commit is contained in:
2026-09-06 16:23:14 +03:00
parent b5b3d75341
commit b49ae4c59f
4 changed files with 12 additions and 2 deletions
+5
View File
@@ -30,3 +30,8 @@ test('expired source takes priority over completion or manually moved Kanban sta
assert.equal(summary.next.target,'source');
assert.equal(summary.owner,'Atanmadı');
});
test('malformed document response is treated as empty instead of crashing the summary',()=>{
assert.doesNotThrow(()=>preparationSummary(tender,{loading:false,error:null,documents:null},now));
const summary=preparationSummary(tender,{loading:false,error:null,documents:null},now);
assert.ok(summary.documentIssues.some(text=>text.includes('belge')));
});