mirror of
https://github.com/remotely-save/remotely-save.git
synced 2024-06-07 21:10:45 +00:00
17 lines
427 B
TypeScript
17 lines
427 B
TypeScript
import { expect } from "chai";
|
|
import { encryptStringToBase32 } from "../src/encrypt";
|
|
|
|
describe("Encryption tests", () => {
|
|
beforeEach(function () {
|
|
global.window = {
|
|
crypto: require("crypto").webcrypto,
|
|
} as any;
|
|
});
|
|
|
|
it("should encrypt string", async () => {
|
|
const k = "dkjdhkfhdkjgsdklxxd";
|
|
const password = "hey";
|
|
expect(await encryptStringToBase32(k, password)).to.not.equal(k);
|
|
});
|
|
});
|