summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/helpers/toHash.test.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2023-08-22 10:13:03 -0700
committerGitHub <noreply@github.com>2023-08-22 10:13:03 -0700
commitfefc95e4535e6ecf903f647124a492fba3fd11d6 (patch)
tree4c924d43d32fb12a780533302eaf5dee08875d75 /packages/server/src/helpers/toHash.test.ts
parent443c341bc2163f07b93a3ef84a43294d10b826f8 (diff)
parent2935857c76d458c26701842e500f8d97d17499c5 (diff)
Merge pull request #425 from MasterKale/feat/server-esm-take-2-dnt
feat/server-esm-take-2-dnt
Diffstat (limited to 'packages/server/src/helpers/toHash.test.ts')
-rw-r--r--packages/server/src/helpers/toHash.test.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/server/src/helpers/toHash.test.ts b/packages/server/src/helpers/toHash.test.ts
index 8893c51..306b81a 100644
--- a/packages/server/src/helpers/toHash.test.ts
+++ b/packages/server/src/helpers/toHash.test.ts
@@ -1,11 +1,13 @@
-import { toHash } from './toHash';
+import { assertEquals } from 'https://deno.land/std@0.198.0/assert/mod.ts';
-test('should return a buffer of at 32 bytes for input string', async () => {
+import { toHash } from './toHash.ts';
+
+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);
});