Skip to content

Commit

Permalink
use assertIsError
Browse files Browse the repository at this point in the history
Signed-off-by: chinodesuuu <chinodesuuu@gmail.com>
  • Loading branch information
sr229 committed Aug 27, 2024
1 parent 3442a81 commit f5a3c5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/deno/sagiri.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { assertEquals, assertExists } from "@std/assert";
import { assertIsError, assertExists } from "@std/assert";
import sagiri from "../../lib/sagiri.ts";

Deno.test("should fail on invalid characters", () => {
assertEquals(() => {sagiri("!!!!!*&#@(!)")}, Function);
assertIsError(sagiri("!!!!!*&#@(!)"), Function);
});

Deno.test("should fail on invalid length", () => {
assertEquals(() => {sagiri("7".repeat(27))}, Function);
assertIsError(sagiri("7".repeat(27)), Error);
});

Deno.test("Resolve with results", () => {
Expand Down

0 comments on commit f5a3c5c

Please sign in to comment.