UNPKG

308 BJavaScriptView Raw
1const { expect } = require('chai');
2const { encrypt, decrypt } = require('../lib/crypto');
3const randomStr = require('../lib/randomStr')();
4
5describe('crypto', function () {
6 it('decrypt(encrypt(randomStr)) => randomStr', function () {
7 expect(decrypt(encrypt(randomStr))).to.equal(randomStr);
8 });
9});