Files
habitica/test/api/v3/unit/libs/encryption.test.js
2016-01-03 09:47:27 -06:00

16 lines
364 B
JavaScript

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