feat: connect tournament views to APIs and recover archived stats
Remove development previews and complete hall of fame, match history, official results, and multi-kill API integration. Fix active match pagination and team-ready controls, preserve basic scoreboards, and recover statistics when Riot archives arrive. Use bounded in-process cache invalidation retries and add the Riot match lookup index migration with regression coverage.
This commit is contained in:
1 parent
20e1e6ec04
commit
0d7617e2d2
70 files changed
+3739
-1793
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import {
|
||||
getInternalMatchOutcome,
|
||||
formatOfficialMatchResult,
|
||||
getMainLane,
|
||||
parseLeaderboardSort,
|
||||
rankLeaderboardByLane,
|
||||
@@ -74,32 +74,23 @@ test('picks the most played lane', () => {
|
||||
assert.equal(getMainLane({}), undefined);
|
||||
});
|
||||
|
||||
test('shows a score for a single two-team series and a winner otherwise', () => {
|
||||
const team = (teamIndex: number) => ({
|
||||
teamIndex,
|
||||
name: `${teamIndex + 1}팀`,
|
||||
members: [],
|
||||
});
|
||||
const pair = getInternalMatchOutcome({
|
||||
winnerTeamIndex: 1,
|
||||
teams: [team(0), team(1)],
|
||||
seriesResults: [
|
||||
{ teamAIndex: 0, teamBIndex: 1, teamAWins: 1, teamBWins: 2 },
|
||||
],
|
||||
});
|
||||
assert.equal(pair?.type, 'score');
|
||||
assert.equal(pair?.type === 'score' && pair.rightWins, 2);
|
||||
assert.equal(pair?.winner?.name, '2팀');
|
||||
|
||||
const tournament = getInternalMatchOutcome({
|
||||
winnerTeamIndex: 2,
|
||||
teams: [team(0), team(1), team(2), team(3)],
|
||||
seriesResults: [],
|
||||
});
|
||||
assert.deepEqual(tournament, { type: 'winner', winner: team(2) });
|
||||
|
||||
assert.equal(
|
||||
getInternalMatchOutcome({ teams: [team(0), team(1)], seriesResults: [] }),
|
||||
undefined,
|
||||
);
|
||||
test('displays official tournament winners by ID and keeps older records neutral', () => {
|
||||
const champion = 'winner' as import('@lolympus/contracts').TeamId;
|
||||
assert.equal(formatOfficialMatchResult({
|
||||
type: 'official',
|
||||
competitionId: 'tournament' as import('@lolympus/contracts').CompetitionId,
|
||||
sourceRevision: 10,
|
||||
phase: 'completed',
|
||||
formatType: 'double-elimination',
|
||||
completedSeriesCount: 2,
|
||||
teams: [{ teamId: champion, name: '별무리' }],
|
||||
outcome: {
|
||||
type: 'double-elimination',
|
||||
championTeamId: champion,
|
||||
placements: [{ rank: 1, teamId: champion }],
|
||||
completedAt: '2026-11-10T00:00:00Z',
|
||||
},
|
||||
}), '우승 · 별무리');
|
||||
assert.equal(formatOfficialMatchResult({ type: 'legacy' }), '과거 기록');
|
||||
assert.equal(formatOfficialMatchResult(undefined), '공식 결과 확인 불가');
|
||||
});
|
||||
Reference in new issue
Block a user