Skip to content

Commit

Permalink
test(uuid): assert error message of version() (#5819)
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k authored Aug 26, 2024
1 parent 96bc247 commit 600dfa4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions uuid/common_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ Deno.test("version() detects the RFC version of a UUID", () => {
assertThrows(() => version(""));
assertThrows(() => version("not a UUID"));
assertThrows(() => version("00000000000000000000000000000000"));
assertThrows(() =>
version(
"=Y00a-f*v00b*-00c-00d#-p00f\b-00g-00h-####00i^^^-00j*1*2*3&-L00k-\n00l-/00m-----00n-fg000-00p-00r+",
)
assertThrows(
() =>
version(
"=Y00a-f*v00b*-00c-00d#-p00f\b-00g-00h-####00i^^^-00j*1*2*3&-L00k-\n00l-/00m-----00n-fg000-00p-00r+",
),
TypeError,
"Cannot detect UUID version: received =Y00a-f*v00b*-00c-00d#-p00f\b-00g-00h-####00i^^^-00j*1*2*3&-L00k-\n00l-/00m-----00n-fg000-00p-00r+",
);
});

0 comments on commit 600dfa4

Please sign in to comment.