rename some invalid percent and date errs

This commit is contained in:
zkldi
2021-05-20 19:57:12 +01:00
parent 6e04dcf0e4
commit f214f74e03
4 changed files with 4 additions and 4 deletions
@@ -162,7 +162,7 @@ export function ParseDateFromString(str: string | undefined | null): number | nu
const date = Date.parse(str);
if (Number.isNaN(date)) {
throw new InvalidScoreFailure(`Could not convert date ${str} to number.`);
throw new InvalidScoreFailure(`Invalid/Unparsable score timestamp of ${str}.`);
}
return date;
@@ -379,7 +379,7 @@ t.test("#ConverterFn", (t) => {
importType,
logger
),
{ message: /Invalid score of 2000, produced percent of 127/u } as any
{ message: /Invalid percent/u } as any
);
t.end();
@@ -127,7 +127,7 @@ t.test("#ConvertFileMerIIDX", (t) => {
t.test("Invalid Date", (t) => {
t.rejects(() => merc({ update_time: "INVALID" }), {
message: /Invalid score timestamp of INVALID/u,
message: /Invalid percent/u,
} as any);
t.end();
@@ -178,7 +178,7 @@ t.test("#ConverterIRFervidex", (t) => {
"ir/fervidex",
logger
),
{ message: /Invalid score of 9999 for chart.*Resulted in percent/giu } as any
{ message: /Invalid percent/giu } as any
);
t.end();