feat: support every song difficulty including Easy and Normal
Publish GitHub Pages output / publish (push) Successful in 41s
Publish GitHub Pages output / publish (push) Successful in 41s
This commit is contained in:
@@ -31,3 +31,14 @@ test('고점 순위와 상위 3곡 합계는 동일 곡의 난이도를 중복
|
||||
assert.equal(leaderRating([]), 0);
|
||||
assert.equal(results[0].theoreticalMaxScore, 5001);
|
||||
});
|
||||
|
||||
test('전체 난이도 추천은 Easy와 Normal을 포함하고 곡별 최고점만 합산한다', () => {
|
||||
const charts = ['easy', 'normal', 'hard', 'expert'].map((difficulty, index) => ({
|
||||
songId: 'song', title: 'Song', difficulty, singerCharacterIds: ['leader'],
|
||||
theoreticalMaxScore: 20000 - index * 5000, expectedScore: 1000
|
||||
}));
|
||||
assert.deepEqual(leaderRatingCharts(charts, 'leader', 'all', Date.now()), charts);
|
||||
assert.deepEqual(leaderRatingCharts(charts, 'leader', 'normal', Date.now()), [charts[1]]);
|
||||
assert.equal(rankSongs(charts)[0].difficulty, 'easy');
|
||||
assert.equal(leaderRating(charts), 4);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user