mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
test(encoding): improve test coverage (#4742)
This commit is contained in:
parent
48506f42c6
commit
aa35b3574f
@ -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",
|
||||
);
|
||||
},
|
||||
|
@ -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 +`,
|
||||
);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user