blob: 8893c5135724bdd6dd79226beb9229473446a262 (
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', async () => {
const hash = await toHash('string');
expect(hash.byteLength).toEqual(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);
});
|