From 97532b0c033cb1af3334c5e6867d049cc2c26a4d Mon Sep 17 00:00:00 2001 From: seditionist <84986004+seditionist@users.noreply.github.com> Date: Thu, 17 Aug 2023 00:35:22 -0400 Subject: [PATCH] fix tests --- __tests__/hiscores.test.ts | 6 +++--- src/utils/constants.ts | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/__tests__/hiscores.test.ts b/__tests__/hiscores.test.ts index 2f44060..9bd6665 100644 --- a/__tests__/hiscores.test.ts +++ b/__tests__/hiscores.test.ts @@ -12,7 +12,7 @@ import { getSkillPageURL, getStatsURL, BOSSES, - INVALID_FORMAT_ERROR, + InvalidFormatError, BH_MODES, parseJsonStats, HiscoresResponse @@ -276,12 +276,12 @@ test('Parse CSV with unknown activity', () => { const statsWithUnknownActivity = `${lynxTitanStats} -1,-1`; expect(() => parseStats(statsWithUnknownActivity)).toThrow( - INVALID_FORMAT_ERROR + InvalidFormatError ); }); test('Parse invalid CSV', () => { - expect(() => parseStats('invalid')).toThrow(INVALID_FORMAT_ERROR); + expect(() => parseStats('invalid')).toThrow(InvalidFormatError); }); describe('Get name format', () => { diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 7cbc749..176a46a 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -280,8 +280,6 @@ export const FORMATTED_SOUL_WARS = 'Soul Wars Zeal'; export const FORMATTED_LEAGUE_POINTS = 'League Points'; export const FORMATTED_RIFTS_CLOSED = 'Rifts closed'; -export const INVALID_FORMAT_ERROR = 'Invalid hiscores format'; -export const PLAYER_NOT_FOUND_ERROR = 'Player not found'; export class InvalidFormatError extends Error { __proto__ = Error;