Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(encoding): improve test coverage #4742

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion encoding/base32_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Deno.test({
fn() {
assertThrows(
() => decodeBase32("OOOO=="),
Error,
"Invalid string. Length must be a multiple of 8",
);
},
Expand All @@ -119,7 +120,8 @@ Deno.test({
name: "decodeBase32() throws on bad padding",
fn() {
assertThrows(
() => decodeBase32("OOOO=="),
() => decodeBase32("5HXR334AQYAAAA=="),
Error,
"Invalid pad length",
);
},
Expand Down
1 change: 1 addition & 0 deletions encoding/base58_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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