Add support for the Legacy Bounty Hunter minigame

This commit is contained in:
David Meredith
2023-05-24 08:48:46 -05:00
parent e4d2b10488
commit 11391c90f2
7 changed files with 540 additions and 415 deletions

View File

@@ -12,7 +12,8 @@ import {
getSkillPageURL,
getStatsURL,
BOSSES,
INVALID_FORMAT_ERROR
INVALID_FORMAT_ERROR,
BH_MODES
} from '../src/index';
const B0ATY_NAME = 'B0ATY';
@@ -79,6 +80,8 @@ test('Parse CSV to json', () => {
23423,478
99831,23
89912,37
89914,35
99834,25
32,12148
3105,76
1997,505
@@ -175,7 +178,9 @@ test('Parse CSV to json', () => {
leaguePoints: { rank: 23423, score: 478 },
bountyHunter: {
hunter: { rank: 99831, score: 23 },
rogue: { rank: 89912, score: 37 }
rogue: { rank: 89912, score: 37 },
legacyHunter: { rank: 89914, score: 35 },
legacyRogue: { rank: 99834, score: 25 }
},
lastManStanding: { rank: 4814, score: 898 },
pvpArena: { rank: 13, score: 4057 },
@@ -475,7 +480,7 @@ test('Get non-existent player', async () => {
});
test('Get stats by gamemode', async () => {
const { skills, bosses } = await getStatsByGamemode(
const { skills, bosses, bountyHunter } = await getStatsByGamemode(
LYNX_TITAN_FORMATTED_NAME
);
@@ -508,8 +513,10 @@ test('Get stats by gamemode', async () => {
const bossKeys = Object.keys(bosses);
expect(bossKeys).toStrictEqual(BOSSES);
const bountyHunterKeys = Object.keys(bountyHunter);
expect(bountyHunterKeys).toStrictEqual(BH_MODES);
expect.assertions(2);
expect.assertions(3);
});
describe('Get stats options', () => {