summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/helpers/toHash.test.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2022-11-11 19:47:02 -0800
committerMatthew Miller <matthew@millerti.me>2022-11-11 19:47:08 -0800
commita42cd6ab88bc3081e86a10d920c5a3949ee48f95 (patch)
treeace1e1dbc9e2253a75465b59f7e141ab69aecafa /packages/server/src/helpers/toHash.test.ts
parentb258acf84eedd5eefdecbe70baaeefe004ad6111 (diff)
Make toHash async to prep for SubtleCrypto
Diffstat (limited to 'packages/server/src/helpers/toHash.test.ts')
-rw-r--r--packages/server/src/helpers/toHash.test.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/server/src/helpers/toHash.test.ts b/packages/server/src/helpers/toHash.test.ts
index df0c50d..8893c51 100644
--- a/packages/server/src/helpers/toHash.test.ts
+++ b/packages/server/src/helpers/toHash.test.ts
@@ -1,11 +1,11 @@
import { toHash } from './toHash';
-test('should return a buffer of at 32 bytes for input string', () => {
- const hash = toHash('string');
+test('should return a buffer of at 32 bytes for input string', async () => {
+ const hash = await toHash('string');
expect(hash.byteLength).toEqual(32);
});
-test('should return a buffer of at 32 bytes for input Buffer', () => {
- const hash = toHash(Buffer.alloc(10));
+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);
});