summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2023-08-17 13:09:12 -0700
committerMatthew Miller <matthew@millerti.me>2023-08-17 13:09:12 -0700
commitabd0b64d63d5a1230554ee0eea1b5d82490ae42c (patch)
tree99c73ff947fa99f757ebc277c7119237f0a0b87a /packages/server/src
parente5a04fea83d55754c5a32ba37ec5600e34128deb (diff)
Update toHash tests
Diffstat (limited to 'packages/server/src')
-rw-r--r--packages/server/src/helpers/toHash.test.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/server/src/helpers/toHash.test.ts b/packages/server/src/helpers/toHash.test.ts
index ce09ccf..f5e4d30 100644
--- a/packages/server/src/helpers/toHash.test.ts
+++ b/packages/server/src/helpers/toHash.test.ts
@@ -1,11 +1,13 @@
+import { assertEquals } from "https://deno.land/std@0.198.0/assert/mod.ts";
+
import { toHash } from "./toHash.ts";
-test("should return a buffer of at 32 bytes for input string", async () => {
+Deno.test("should return a buffer of at 32 bytes for input string", async () => {
const hash = await toHash("string");
- expect(hash.byteLength).toEqual(32);
+ assertEquals(hash.byteLength, 32);
});
-test("should return a buffer of at 32 bytes for input Buffer", async () => {
- const hash = await toHash(Buffer.alloc(10));
- expect(hash.byteLength).toEqual(32);
+Deno.test("should return a buffer of at 32 bytes for input Buffer", async () => {
+ const hash = await toHash(new Uint8Array(10).fill(0));
+ assertEquals(hash.byteLength, 32);
});