diff --git a/encoding/base32_test.ts b/encoding/base32_test.ts index 13b8fdba9f70..6558b5d9c448 100644 --- a/encoding/base32_test.ts +++ b/encoding/base32_test.ts @@ -110,6 +110,7 @@ Deno.test({ fn() { assertThrows( () => decodeBase32("OOOO=="), + Error, "Invalid string. Length must be a multiple of 8", ); }, @@ -119,7 +120,8 @@ Deno.test({ name: "decodeBase32() throws on bad padding", fn() { assertThrows( - () => decodeBase32("OOOO=="), + () => decodeBase32("5HXR334AQYAAAA=="), + Error, "Invalid pad length", ); }, diff --git a/encoding/base58_test.ts b/encoding/base58_test.ts index 77403aa02498..a1cc84b7e64b 100644 --- a/encoding/base58_test.ts +++ b/encoding/base58_test.ts @@ -67,6 +67,7 @@ Deno.test("decodeBase58() decodes binary", () => { Deno.test("decodeBase58() throws on invalid input", () => { assertThrows( () => decodeBase58("+2NEpo7TZRRrLZSi2U"), + Error, `Invalid base58 char at index 0 with value +`, ); });