mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Add more tests
This commit is contained in:
parent
9545245267
commit
ce7d3bf461
@ -33,6 +33,12 @@ describe("Decimal", () => {
|
||||
});
|
||||
|
||||
it("throws for atomics that are not non-negative integers", () => {
|
||||
expect(() => Decimal.fromAtomics("0xAA", 0)).toThrowError(
|
||||
"Invalid string format. Only non-negative integers in decimal representation supported.",
|
||||
);
|
||||
expect(() => Decimal.fromAtomics("", 0)).toThrowError(
|
||||
"Invalid string format. Only non-negative integers in decimal representation supported.",
|
||||
);
|
||||
expect(() => Decimal.fromAtomics("-1", 0)).toThrowError(
|
||||
"Invalid string format. Only non-negative integers in decimal representation supported.",
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user