feat: import and group AlbionBB battle history

This commit is contained in:
Meghdad committed 2026-10-18 21:52:32 +03:30
1 parent 2f13547239
commit 4cea3709af
180 files changed
+69005 -26

No files matched your search

+12
View File
@@ -90,3 +90,15 @@ test('empty archives stay empty and report titles are escaped',()=>{
assert.ok(!html.includes('<script>'));
assert.match(html,/&lt;script&gt;/);
});
test('large archives expose twelve initial cards and keep older cards in a native disclosure',()=>{
const battles=Array.from({length:15},(_,i)=>({...single,title:`Fight ${i}`,date:`2026-10-${String(i+1).padStart(2,'0')}`}));
for(const lang of ['en','fa']){
const html=render(battles,lang);
const [visible,older]=html.split('<details class="battle-ledger battle-more">');
assert.equal((visible.match(/<article /g)||[]).length,12);
assert.equal((older.match(/<article /g)||[]).length,3);
assert.ok(visible.includes('Fight 14'));assert.ok(older.includes('Fight 0'));
assert.ok(!html.includes('undefined'));
}
});