mirror of
https://github.com/maxswa/osrs-json-hiscores.git
synced 2025-10-15 10:19:04 +00:00
fix tests
This commit is contained in:
@@ -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', () => {
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user