3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-18 15:00:00 +00:00
zeppelin/backend/src/utils/crypt.test.ts

9 lines
317 B
TypeScript

import test from "ava";
import { decrypt, encrypt } from "./crypt";
test("encrypt() followed by decrypt()", t => {
const original = "banana 123 👀 💕"; // Includes emojis to verify utf8 stuff works
const encrypted = encrypt(original);
const decrypted = decrypt(encrypted);
t.is(decrypted, original);
});