summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/helpers/toHash.test.ts
blob: df0c50d2644c37c11123987f5a150e3f7f82643f (plain)
1
2
3
4
5
6
7
8
9
10
11
import { toHash } from './toHash';

test('should return a buffer of at 32 bytes for input string', () => {
  const hash = 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));
  expect(hash.byteLength).toEqual(32);
});