Files
habitica/test/api/v3/unit/libs/encryption.test.js
2015-11-14 17:43:56 +01:00

16 lines
365 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);
});
});