chore: update test & fix spelling
This commit is contained in:
parent
048169fd3f
commit
bd8c2b8c18
@ -33,7 +33,9 @@ describe("Decimal", () => {
|
||||
});
|
||||
|
||||
it("throws for atomics that are not non-negative integers", () => {
|
||||
expect(() => Decimal.fromAtomics("-1", 0)).toThrowError(/atomics must not be negative/i);
|
||||
expect(() => Decimal.fromAtomics("-1", 0)).toThrowError(
|
||||
/invalid string format. Only non-negative integers in decimal representation supported/i,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@ export class Decimal {
|
||||
private constructor(atomics: string, fractionalDigits: number) {
|
||||
if (!atomics.match(/^[0-9]+$/)) {
|
||||
throw new Error(
|
||||
"Invalid string format. Only non-negative integers in decimal representation suppored.",
|
||||
"Invalid string format. Only non-negative integers in decimal representation supported.",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user