Files
habitica/test/api/unit/libs/encryption.test.js
Matteo Pagliazzi 85fb5f33aa fix test lint
2019-10-08 20:45:38 +02:00

16 lines
363 B
JavaScript

import {
encrypt,
decrypt,
} from '../../../../website/server/libs/encryption';
describe('encryption', () => {
it('can encrypt and decrypt', () => {
const data = 'some secret text';
const encrypted = encrypt(data);
const decrypted = decrypt(encrypted);
expect(encrypted).not.to.equal(data);
expect(data).to.equal(decrypted);
});
});