homehub/packages/homehub_core/tests/lib/hashlib.spec.js

16 lines
383 B
JavaScript
Raw Normal View History

2021-08-26 10:33:15 +00:00
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'
);
});
});
});