mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-18 15:00:00 +00:00
9 lines
337 B
TypeScript
9 lines
337 B
TypeScript
import test from "ava";
|
|
import { decrypt, encrypt } from "./crypt";
|
|
|
|
test("encrypt() followed by decrypt()", async (t) => {
|
|
const original = "banana 123 👀 💕"; // Includes emojis to verify utf8 stuff works
|
|
const encrypted = await encrypt(original);
|
|
const decrypted = await decrypt(encrypted);
|
|
t.is(decrypted, original);
|
|
});
|