Skip to content

Commit

Permalink
Add simple test for url and base64 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
deen13 committed Apr 18, 2024
1 parent 352767a commit e12d995
Show file tree
Hide file tree
Showing 3 changed files with 1,289 additions and 9 deletions.
9 changes: 9 additions & 0 deletions integreat_cms/static/src/js/__tests__/utils/mfa-utils.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { expect, test } from "vitest";
import { b64enc } from "../../utils/mfa-utils";

test("base64 and url encoding", () => {
const testDataString = "https://example.com/?q=Hello+World!";
const testData = new TextEncoder().encode(testDataString);

expect(b64enc(testData)).toBe("aHR0cHM6Ly9leGFtcGxlLmNvbS8_cT1IZWxsbytXb3JsZCE");
});
Loading

0 comments on commit e12d995

Please sign in to comment.