fix tests

This commit is contained in:
seditionist
2023-08-17 00:35:22 -04:00
parent f9a56e2b3a
commit 97532b0c03
2 changed files with 3 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ import {
getSkillPageURL, getSkillPageURL,
getStatsURL, getStatsURL,
BOSSES, BOSSES,
INVALID_FORMAT_ERROR, InvalidFormatError,
BH_MODES, BH_MODES,
parseJsonStats, parseJsonStats,
HiscoresResponse HiscoresResponse
@@ -276,12 +276,12 @@ test('Parse CSV with unknown activity', () => {
const statsWithUnknownActivity = `${lynxTitanStats} const statsWithUnknownActivity = `${lynxTitanStats}
-1,-1`; -1,-1`;
expect(() => parseStats(statsWithUnknownActivity)).toThrow( expect(() => parseStats(statsWithUnknownActivity)).toThrow(
INVALID_FORMAT_ERROR InvalidFormatError
); );
}); });
test('Parse invalid CSV', () => { test('Parse invalid CSV', () => {
expect(() => parseStats('invalid')).toThrow(INVALID_FORMAT_ERROR); expect(() => parseStats('invalid')).toThrow(InvalidFormatError);
}); });
describe('Get name format', () => { describe('Get name format', () => {

View File

@@ -280,8 +280,6 @@ export const FORMATTED_SOUL_WARS = 'Soul Wars Zeal';
export const FORMATTED_LEAGUE_POINTS = 'League Points'; export const FORMATTED_LEAGUE_POINTS = 'League Points';
export const FORMATTED_RIFTS_CLOSED = 'Rifts closed'; 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 { export class InvalidFormatError extends Error {
__proto__ = Error; __proto__ = Error;