homehub/packages/homehub_core/tests/lib/hashlib.spec.js
2021-08-26 12:33:15 +02:00

16 lines
383 B
JavaScript

import * as HashLib from 'src/lib/hashlib';
describe('src/lib/hashlib', () => {
describe('sha256', () => {
it('generates a hex digest of a message', async () => {
// Given
const result = await HashLib.sha256('spam');
// Then
expect(result).toEqual(
'f10c5a90947d4313c6af600facfb0c259444e4932a217fc341be0b3776f40933'
);
});
});
});