Files
bonob/tests/encryption.test.ts
2021-03-01 17:28:48 +11:00

12 lines
313 B
TypeScript

import encryption from '../src/encryption';
describe("encrypt", () => {
const e = encryption();
it("can encrypt and decrypt", () => {
const value = "bobs your uncle"
const hash = e.encrypt(value)
expect(hash.encryptedData).not.toEqual(value);
expect(e.decrypt(hash)).toEqual(value);
});
})