mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-13 20:57:24 +01:00
16 lines
363 B
JavaScript
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);
|
|
});
|
|
});
|