feat: import and group AlbionBB battle history
This commit is contained in:
180 files changed
+69005
-26
No files matched your search
@@ -90,3 +90,15 @@ test('empty archives stay empty and report titles are escaped',()=>{
|
||||
assert.ok(!html.includes('<script>'));
|
||||
assert.match(html,/<script>/);
|
||||
});
|
||||
|
||||
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'));
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user